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:

  1. read line (by class databasesaver)

  2. tell gui display , ask (maybe send event class guidisplay)

  3. 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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -