PROGRAM JTEXTFIELD!       Example textfield.f

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

USE JAPI

INTEGER :: frame,login,passwd,obj
CHARACTER (LEN=256) :: inhalt

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

frame   = j_frame("login with name and password")

login   = j_textfield(frame,35)
passwd  = j_textfield(frame,35)

CALL j_setpos(login,10,40)
CALL j_setpos(passwd,10,70)

CALL j_setechochar(passwd,"*")

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

IF(obj == login) THEN
  CALL j_gettext(login,inhalt)
  PRINT*, "Your name is ",inhalt
END IF

IF(obj == passwd) THEN
  CALL j_gettext(passwd,inhalt)
  PRINT*, "Your password is ",inhalt
END IF

IF(inhalt(1:4) == "exit") EXIT NEXTACTION

END DO NEXTACTION

20  CONTINUE

CALL j_quit()
END PROGRAM JTEXTFIELD
