PROGRAM JSCROLBAR!       Example scrollbar.f

! Code converted using TO_F90 by Alan Miller
! Date: 2001-03-15  Time: 13:02:34

USE JAPI 

INTEGER :: frame,obj
INTEGER :: scroll


IF( .NOT. j_start()) THEN
  PRINT*, "can't connect to JAPI server"
  GO TO 20
END IF

frame   = j_frame("Scrollbar Demo")

scroll=j_hscrollbar(frame)
CALL j_setsize(scroll,300,20)
CALL j_setpos(scroll,10,60)

CALL j_setmin(scroll,10)
CALL j_setmax(scroll,150)
CALL j_setslidesize(scroll,28)
CALL j_setunitinc(scroll,2)
CALL j_setblockinc(scroll,12)
CALL j_setvalue(scroll,50)

CALL j_pack(frame)
CALL j_show(frame)
NEXTACTION: DO
      obj =  j_nextaction()
      
      CALL j_beep()
      
      IF(obj == frame) EXIT NEXTACTION

      IF(obj == scroll) print*,"Scrollbar Value : ",j_getvalue(scroll)

END DO NEXTACTION

20  continue
CALL j_quit()
END PROGRAM JSCROLBAR


