PROGRAM JRADIOBTN!       Example radiobutton.f

! Code converted using TO_F90 by Alan Miller
! Date: 2001-03-15  Time: 12:45:57

USE JAPI

INTEGER :: frame,obj
INTEGER :: radio
INTEGER :: enable,middle,disable

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

!       Generate Graphical Objects
frame   = j_frame("Radiobuttons")

radio   = j_radiogroup(frame)

enable  = j_radiobutton(radio,"Enable middle Button")
CALL j_setpos(enable,120,80)

middle  = j_radiobutton(radio,"Middle Button")
CALL j_setpos(middle,120,120)

disable = j_radiobutton(radio,"Disable middle Button")
CALL j_setpos(disable,120,160)

CALL j_setstate(enable, .true. )
CALL j_show(frame)
NEXTACTION: DO
!       Waiting for actions */
      obj=j_nextaction()

IF(obj == enable)  CALL j_enable(middle)
IF(obj == disable) CALL j_disable(middle)

IF(obj == frame) EXIT NEXTACTION

END DO NEXTACTION

20  continue
CALL j_quit()
END PROGRAM JRADIOBTN

