File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Null Pointer Exception in a GUI application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Null Pointer Exception in a GUI application

Haani Naz

Joined: May 30, 2010
Posts: 23
Hi Guys,

i would like to extend this question by asking something about my code.

i'm basically attempting to use extended JFrame (to understand how it differs) but i've run into a problem.

i decided to post the code so it makes more sense:

followed by:

This fails to work - i get run time errors. Can somebody please tell me why..? thanks.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46362
Damn! I split the thread incorrectly. Please keep reading here.
It is sorta covered in the JavaRanch Style Guide.
subject: Null Pointer Exception in a GUI application
It's not a secret anymore!