I'm converting a console application to one that uses Swing. At the moment I want my program to do a similar thing to this .nextInt();
how can I achieve this by using .getText();
or something similar?
In short;
How can I hold the execution of the program till the user has entered something in the text field and pressed enter.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…