Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program execution and GUI

Okay so I'm designing a gui. Typically I've done GUIs that take a certain set of initial input and then fires off the program to do the work. But now I need something a little different. I need a program that is running, gets to point A, fires off a GUI and hults execution until a check box is selected. Once selected the program takes the input in the GUI and continues execution with the newly created variables from the GUI input.

My question is what is the best way to do this? Event, window, action listeners? This type of thing was easy with javascript and php, however never did it like this before in java. Not sure what to google or where to go from here. Doing my best to google some examples until I get a response here. Thanks all.

I've tried this so far from responses but it throws up a huge giant blob of a mess in middle of screen. Not sure. What the gibberish means, looks like some kind of properties of the radiobuttons. It does function though. It halts 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);
like image 479
whitewolfpgh Avatar asked Aug 01 '26 15:08

whitewolfpgh


1 Answers

Looks like you'll be needing a modal dialog.

like image 91
mre Avatar answered Aug 04 '26 04:08

mre



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!