• Post Reply Bookmark Topic Watch Topic
  • New Topic

NullPointerException error on beveled border  RSS feed

 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have snippets from my code to show and need help why I can't have one of the actionPerformed coding work? I'm trying to create a beveled border when the user clicks on the sub menu but I get a nullPointerException. The exact coding works if the user clicks on the line border but not on the beveled so obviously they both don't work the same considering my code lol or I just have a dumb error. The error is at line 69. cut most of the code to make it easier on the eye

 
Piet Souris
Rancher
Posts: 1943
66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi George,

in lines 9-15 you declare your members, but I do not see the member 'beveledPanel'.
Therefore the error on line 69.

Greetings,
Piet
 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh I'm sry for some reason it's not in this code but it's on my original code. I have JPanel beveledPanel; between line 13 and 14. I wish that was the case but the code is still not working even with it =/
 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a run-time error btw
 
George Avilez
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh wait nvr mind I got it! I noticed when I put JPanel beveledPanel; on the comment. It's supposed to be JPanel beveledPanel = new JPanel(); Thanks for your help though and having me second look it on =p
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!