On Aug 21, 2008, at 2:37 AM, tj_takehana wrote:
Hi, all.
I just started using WindowUtils from examples for JavaFX then got the
problem on making a transparent frame.
i tried followings.
javafx.application.Frame
WindowUtils.setWindowTransparent(Frame.window, true);
-> Frame layout is undecorated but the backgroud of a PNG picture isnt
transparent.
It's possible that the parent component displaying the picture is
opaque. I'd recommend asking about this of the javafx folks or on
their list.
javafx.ext.swing.SwingFrame
WIndowUtils.setWindowTransparent(SwingFrame.window, true);
WIndowUtils.setWindowTransparent(SwingFrame.getAWTWindow(), true);
WIndowUtils.setWindowTransparent(SwingFrame.getJFrame().getWindows()
[0], true);
-> Frame layout is undecorated but the backgroud of a PNG picture isnt
transparent but filled with light-grey.
javax.swing.JFrame
WIndowUtils.setWindowTransparent(JFrame.getWindow()[0], true);
-> works normally.
i dont see what's wrong on giving java.lang.Window object to
WindowUtils. i tried to track out the code but it wasnt any help cos
my knowledge is far from graphic things :S could anybody help me out ?
heres my environment:
Windows XP SP2
Java Compiler : JDK 1.6.07
Library : JavaFX Preview SDK, examples from JNA.
IDE : NetBeans 3.1
Again, if some parts of the content are not transparent, it's probably
because there's a component painting there. Use a hierarchy display
tool (the Costello editor has one (abbot.sf.net), there's also a Swing
Explorer) to see if there's an opaque component between the
transparent window and the PNG.