java - Taking input from a text field in one class and scanning it in a different class -


i trying make gui program have completed , not want modify. problem program uses scanner user input , don't know how input gui scanner. know how use gettext() text field in gui doesn't update scanner main program waits input , doesn't continue.

"i trying make gui program have completed , not want modify."

when give restrictions such this, idea explain more, such reasons restriction; understanding helps give better answers.

"my problem program uses scanner user input , don't know how input gui scanner. know how use gettext() text field in gui doesn't update scanner main program waits input , doesn't continue."

you trying next impossible. solution: correct console class user interface portion separated out, la mvc, model can used either console program or gui program.

so simple answer is: don't try this. create behaved set of classes decent separation of concerns can re-use classes well.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -