JLayeredPane possible in BorderLayout.CENTER ?
- From: "alex_us01" <arisalex@xxxxxxxxx>
- Date: 30 Sep 2005 10:32:10 -0700
hi,
I tried to use JLayeredPane as follows and nothing in it shows up.
What is the problem?
thanks,
alex
--------------
import java.awt.*;
import javax.swing.*;
public class LPTry {
public static void main(String[] args) {
JFrame jf = new JFrame();
jf.getContentPane().setLayout(new BorderLayout());
JLabel tlabel = new JLabel("east");
jf.getContentPane().add(tlabel, BorderLayout.EAST);
JLayeredPane lpane = new JLayeredPane();
tlabel = new JLabel("center bottom");
lpane.add(tlabel, JLayeredPane.DEFAULT_LAYER);
jf.getContentPane().add(lpane, BorderLayout.CENTER);
jf.pack();
jf.setVisible(true);
}
}
.
- Follow-Ups:
- Re: JLayeredPane possible in BorderLayout.CENTER ?
- From: alex_us01
- Re: JLayeredPane possible in BorderLayout.CENTER ?
- Prev by Date: Re: a swing component on top of another
- Next by Date: Re: JNI C++ importatn process
- Previous by thread: Class data sharing on windows not working if I set large heap size
- Next by thread: Re: JLayeredPane possible in BorderLayout.CENTER ?
- Index(es):