Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My JFrame class causes exception

Mark van de Veerdonk
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm modifying Bean Builder ( to do some experimenting. By default it uses an instance of JFrame as the base class of the window that is edited (see BeanBuilder.handleNew()). I've changed this so it uses my class which extends JFrame. Allthough my class does nothing besides extend from JFrame and implements the same constructors as JFrame, I get a NullPointerException when I start the application! For some reason evt.getComponent().getParent() returns null in LayoutPane.componentResized(). This doesn't happen when JFrame is used.

How can this be? I'm using a class that is (as far as I know) functionally the same as the one used before and now I get an error?

Anybody any ideas? Do I have to do more than extend JFrame and implement the same constructors in order for my class to behave the same as JFrame?

Thanx, Mark
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic