Java – program execution and GUI

OK, so I'm designing a GUI Usually I have finished the GUI, which accepts a set of initial inputs and then triggers the program to complete the work But now I need something different I need a running program to enter point a, trigger the GUI and execute hults until the check box is selected After selection, the program will get the input in the GUI and continue to execute with the newly created variable in the GUI input

My question is, what is the best way? Events, windows, actions, listeners? This type of thing is easy to use JavaScript and PHP, but it has never been done in Java before I don't know how or where to go to Google Try my best to Google some examples until I get a reply Thank you

I've tried this reaction so far, but it throws a huge mess in the middle of the screen uncertain. What does garbled code mean? It looks like some attribute of RadioButtons It really works It stopped execution

JRadioButton rb1 = new JRadioButton("Modify 1");
JRadioButton rb2 = new JRadioButton("Modify 2");
JRadioButton rb3 = new JRadioButton("Modify 3");
JRadioButton rb4 = new JRadioButton("Modify 4");
JOptionPane.showInputDialog(null,"Please choose Scenario."+rb1+rb2+rb3+rb4,JOptionPane.QUESTION_MESSAGE);

Solution

Looks like you need a modal dialog

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>