Hi,

I am trying to work with Java3D and Swing on Linux. I was able to
run some 3D programs but stuck when I tried to place JPanel and
Canvas3D on the same Frame.

When I run my program I could see my Canvas3D objects very well,
but my JPanel object always lies behind the background color in
the main Frame. I could see some small part of it, if I resize
the Frame, I could see (sometimes) larger part of it, but I could
not place it on front.  My heavy and light objects don't overlap,
nevertheless I could not see all of them.

I read Amy Fowler's article
(http://java.sun.com/products/jfc/tsc/articles/mixing/index.html)
about mixing heavy and light components
but the example only tells about JPopupMenu:

JPopupMenu.setDefaultLightWeightPopupEnabled(false);

What I can do for JPanel?

Currently I add JPanel to Frame - I could not make it otherwise.
Do you have any ideas?

Here is a piece of code:

.....................................
    HelloUniverse helloUniverse = new  HelloUniverse(); // heavy
component 3D

    DisplayImagePanel displayImagePanel = new DisplayImagePanel();
//JPanel

    displayImagePanel.setBounds(0, 100, 128, 128);
    displayImagePanel.CreateImage();

    Frame frame = new MainFrame(helloUniverse, 400, 400);
    frame.add(displayImagePanel);
    frame.setVisible(true);
    frame.validate();
.....................................

Thank you,

Jacob Nikom

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to