Child Window(JDialog) hide when using with fixed screen resolution
shyam shridhar
Ranch Hand
Joined: Sep 15, 2006
Posts: 31
posted
0
Hello,
I am making my project resolution specific. It means my project always running in 1024*768 screen resolution whatever is system resolution that does't matter.
But I am facing a critical problem when i running my project and on click any button a new pop up window(JDialog) open when i move slightly move JDialog than JDialog is make invisible after moving mouse over and over JDialog some part of JDialog is visible to me.
I am try setOpaque and many differnet option but my problem is not solve.
check the following code if found any solution then please response me it's urgent :
If you are using full screen exclusive mode you can't open any windows/dialogs/etc. From the JavaDocs for GraphicsDevice.setFullScreenMode() -
If isFullScreenSupported returns true, full screen mode is considered to be exclusive, which implies:
* Windows cannot overlap the full-screen window. All other application windows will always appear beneath the full-screen window in the Z-order.
You'll need to "fake" a dialog and paint it in the same frame, but on top of existing components. Painting to the Glass Pane would probably simulate a dialog well. [ September 15, 2006: Message edited by: Nathan Pruett ]
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
shyam shridhar
Ranch Hand
Joined: Sep 15, 2006
Posts: 31
posted
0
Hi Nathan,
Thanks for reply. I actually forget that i submit problem on this forum also. Now I try to do which you told.Till then you check this Sample Code
if(graphicsDevice.isDisplayChangeSupported()){ graphicsDevice.setDisplayMode(displayMode); } di = new JDialog(m,""); di.setSize(400,400); di.setVisible(true); m.setVisible(true); }
public static void main(String ar[]) { Light1 l= new Light1(); }
}
shyam shridhar
Ranch Hand
Joined: Sep 15, 2006
Posts: 31
posted
0
Nathan Pruett >You'll need to "fake" a dialog and paint it in the same frame, but on top >of existing components. Painting to the Glass Pane would probably >simulate a dialog well.
I can't understand meaning of above line. I try to do with GlassPane but i am failed to achived my goal.
a early and good response will be very help full for me.