Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JLayeredPane problem  RSS feed

 
Cunces Corten
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm having a problem using the JLayeredPane.

you can read my code at http://cunces.pastebin.com/m533144f2

I'm having some problems with adding stuff to my JLayeredPane (defender and level aren't added to the screen).
Can someone tell me why they aren't added?

thanks
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of us reading your code, why don't you read the Swing tutorial for a working example and compare the working code with your code to see what you are doing wrong?

How to Use Layered Panes
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not only that but the code pasted is quite large and won't even compile as it is missing required dependencies such as other class named Bullet and optiesListener.
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch

This FAQ may help explain about the size of code. Look for the nifty.com link in it, then find what an SSCCE is and post that.
 
Cunces Corten
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oké thanks for the link. I've got it working now
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!