W2R2 –Bring up a Dialog Box -- changed some minor code. mostly added comments for myself so i can remember what im coding ...
This commit is contained in:
1 parent
25cb72aafc
commit
d13f8db979
1 file changed
+3
-3
@@ -56,9 +56,9 @@ public class MainViewer {
|
|||||||
|
|
||||||
|
|
||||||
public void DialogueBox(String JRtext){
|
public void DialogueBox(String JRtext){
|
||||||
JOptionPane pane = new JOptionPane(JRtext);
|
JOptionPane pane = new JOptionPane(JRtext); // content of dialogue box
|
||||||
JDialog dialog = pane.createDialog("Change Name to what?");
|
JDialog dialog = pane.createDialog("Change Name to what?"); // title of dialogue box
|
||||||
dialog.show();
|
dialog.setVisible(true); // changed boiler plate code from .show() to .setVisible(true) because apparently IDE says it's better!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user