JFrame Question
Hi, Anyone can tell me, How to make my JFrame background color like a glass that can mirror the behind of JFrame object? Thank You.
Hi, Anyone can tell me, How to make my JFrame background color like a glass that can mirror the behind of JFrame object? Thank You.
Not a perfect solution but this might give you what you're after.
In the initialization of your JFrame add the following
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) ;
}
catch(Exception e){
// Do something with the exception here
}
PS.
I know the UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) function. My problem is how to make my JFrame like a glass can mirror the JFrame's behind Object scene?
you want a window or you want a mirror? mirrors reflect, typically backwards, I doubt that's what you want.
You can't do transparent windows in Java without some native code help (maybe SWT?) such as the Skin L&F. At least not except as a total hack that doesn't work well if the background changes often.
How about to make a JDialog like a mirror that can view JFrame?
You want to be able to see the JFrame (or whatever else) is behind the dialog?
I think you'd have to go native to even get close and I can't see any possible benefit from doing it.
PS.
You can't do transparent windows in Java without some native code help (maybe SWT?) such as the Skin L&F. At least not except as a total hack that doesn't work well if the background changes often.
unless you use JDesktopPane and JInternalFrames, then you have some options, but that's only going to show what's in your app's window.
So, How to capture the Dimension scene into JFrame?