swing - Java GUI (SWT) - display text while performing other actions like reading that text -
i have java class reads text file. each line read, class (called x
), writes record database.
this works without gui, linux shell.
i'd have nice gui where, when x class reads 1 single line (and on every line), can display popup or similar (jframe
, jtable
, etc.) , ask user if line has written database.
how let 2 classes (the databasesaver
, guidisplayer
) interoperate? it's not necessary parallelize work, like:
for each line:
read line (by class
databasesaver
)tell gui display , ask (maybe send event class
guidisplay
)listen response , (by class
databasesaver
)
is possible attach gui event listener actions of class?
i assume reading values in loop. inside loop, make call gui , pass text confirm yes/no option. on yes, call method insert database. on no, continue next line.
am missing something?
Comments
Post a Comment