Im creating an application with netbeans in Java. When i print a dialog box, it goes behind the Jframe.. I have to drag the frame aside and then click okay.
Asked
Active
Viewed 40 times
0
-
1You're likely not setting the dialog's parent properly -- check, is it null? It should be the JFrame that launches it. – Hovercraft Full Of Eels Jun 18 '17 at 10:22
-
Yes it is null. – CodeMan Jun 18 '17 at 10:25
-
Well, then there you go. – Hovercraft Full Of Eels Jun 18 '17 at 10:25
-
In the future, please show pertinent code so we don't have to make wild guesses. – Hovercraft Full Of Eels Jun 18 '17 at 10:26
-
My code is: JoptionPane. Showmessagediaglog(null, "message") ; – CodeMan Jun 18 '17 at 10:26
-
Please show code in the question, not in comments. Not necessary now since you know the cause of the problem and its solution, but for future reference. Also it will help for you to go through the How-To-Ask sections of the [help]. Good luck. – Hovercraft Full Of Eels Jun 18 '17 at 10:27