> Is it possible to have a JLayeredPane inside a JPanel??
>
> I've tried this but the JLayeredPane does not display:
>
> JFrame myFrame = new JFrame();
> JPanel myPanel = new JPanel();
myPanel.setLayout(new BorderLayout());
> JLayeredPane layeredPane = new JLayeredPane();
>
[quoted text clipped - 3 lines]
> frame.getContentPane().add(myPanel);
> frame.show();
____________
http://reader.imagero.com the best java image reader.
Steve W. Jackson - 14 Apr 2004 16:43 GMT
>:> Is it possible to have a JLayeredPane inside a JPanel??
>:>
[quoted text clipped - 12 lines]
>:> frame.getContentPane().add(myPanel);
>:> frame.show();
I fail to see what that would do. The default layout manager for JPanel
is FlowLayout anyway.
However, it seems like the OP could benefit from visiting the tutorial
on using a layered pane. It can be found at
<http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.h
tml>. It includes a discussion of how to use the layered pane as a
component for managing Z order of other components, and also mentions
that Java 1.5 is expected to have an API for managing Z order without
the use of a JLayeredPane.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama