Java Applet Development - How to make use of JApplet's JLayeredPanel?
My applet has several screens.. a loading screen a login screen a chat screen etc. It switches between screens at various times during operation. Here are some snipits from the current code:
// Load Panels (called soon after init() while the loading panel is displayed)
This code works fine. But my app has gotten more complicated and I need to manage several layers. I was hoping this would work.. but it doesn't. Can anyone tell me why?
// Load Panels (called soon after init() while the loading panel is displayed)
When I use this code nothing shows up. The applet is blank. Thanks very much if you can help,Stephen
Re: How to make use of JApplet's JLayeredPanel? (reply 1 of 1) (In reply to )
I never tryied the JLayeredPane add(comp) function and am away from my compiler right now. I would suggest you try this signature (as given in http://java sun com/j2se/1.4.2/docs/api/javax/swing/JLayeredPane html) : layeredPane add(child. JLayeredPane. DEFAULT_LAYER); or layeredPane add(child new Integer(10)); I used it in my game applet to display the login dialog using JLayeredPane. MODAL_LAYER and didn't experienced any problem. Hope this helps. Carl
Unless otherwise licensed code in all technical manuals herein (including articles. FAQs samples) is provided under this.
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=5232488
comments | Add comment | Report as Spam
|