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.

[138 byte] By [jiong_ronga] at [2007-11-27 11:05:54]
# 1

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.

puckstopper31a at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 2

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?

jiong_ronga at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 3

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.

bsampieria at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 4

How about to make a JDialog like a mirror that can view JFrame?

jiong_ronga at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 5

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.

puckstopper31a at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 6

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.

bsampieria at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 7

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.

bsampieria at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...
# 8

So, How to capture the Dimension scene into JFrame?

jiong_ronga at 2007-7-29 13:11:46 > top of Java-index,Desktop,Core GUI APIs...