• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

layered Pane issues

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I'm trying to set one JPanel into JLayered Pane. I've tried everything I found in google but still no working. I want this new JPanel to be added to the JLayered Pane when the useres click a JMenu. Can someone give me some tips to get this done? Thanks in advance for your help
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch
We usually discuss that sort of question in our Swing forum. Moving.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you adding the JPanel? Have you set the depth? If not please go though this http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html
If yes, can you please show us your code where you are adding the JPanel?
 
Marco Salazar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I'm creating my GUI using the drag &drop option from netbeans and it generates the code automatically. Btw, the Jpanel I'm trying to add is from other class.
Here is the code I have, thnx a lot for all your help. Also I try the link you gave me but it didn't work.

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Marco Salazar wrote:I'm creating my GUI using the drag &drop option from netbeans and it generates the code automatically.


Quit doing that immediately. You'll learn absolutely nothing that way, and the code created by your IDE is usually quite horrendous to read.
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic