PROGRAM JSMPLMENU!       Example simplemenu.f

! Code converted using TO_F90 by Alan Miller
! Date: 2001-03-15  Time: 15:46:03

USE JAPI 

INTEGER :: frame,menubar
INTEGER :: FILE,quit,obj

CALL j_setdebug(5)

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

frame    = j_frame("Simple")

menubar  = j_menubar(frame)
FILE     = j_menu(menubar,"File")
quit     = j_menuitem(FILE,"Quit")

CALL j_show(frame)
NEXTACTION: DO
      obj =  j_nextaction()

IF((obj == frame) .OR. (obj == quit)) EXIT NEXTACTION

END DO NEXTACTION

20  CONTINUE
CALL j_quit()
END PROGRAM JSMPLMENU


