PROGRAM JALERT!       Example alert.f

USE JAPI

INTEGER :: frame,alert,obj

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

frame   = j_frame("alert Dialog Demo")
CALL j_show(frame)

alert  = j_messagebox(frame,"www.iarchitect.com",  &
    "All examples are typical Microsoft"//CHAR(10)//  &
    "error warning found at:"//CHAR(10)// "www.iarchitect.com")

CALL j_sleep(5000)
CALL j_dispose(alert)

alert  = j_alertbox(frame, "Error Deleting File",  &
    "Cannot delete 016: There is not enough free"//CHAR(10)//  &
    "disk space. Delete one ore more files to"//CHAR(10)//  &
    "free disk space, and then try again.","OK")
PRINT*, "alert : ", alert

alert  = j_choicebox2(frame, "Performance Warning",  &
    "A new MS-DOS resident program named 'WIN'"//CHAR(10)//  &
    " may decrease your system's performance."//CHAR(10)//  &
    "Would you like to see more information about this problem?",  &
    " Yes ","  No  ")
PRINT*, "alert : ",alert

alert  = j_choicebox3(frame, "SQL Windows",  &
    "This item doesn't belong here","   Yes   ", "    No    ","Cancel")
PRINT*, "alert : ",alert

NEXTACTION:DO
    obj =  j_nextaction()
    IF(obj == frame) EXIT
END DO NEXTACTION

20  CONTINUE
CALL j_quit()
END PROGRAM JALERT
