aspose file tools*
The moose likes Applets and the fly likes Panic about an Applet for a simple diner menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Panic about an Applet for a simple diner menu" Watch "Panic about an Applet for a simple diner menu" New topic
Author

Panic about an Applet for a simple diner menu

scott schlesinger
Greenhorn

Joined: May 08, 2012
Posts: 1
I am having some major runtime issues with this code and have been experiencing huge headaches over this code and this forum has been popping up repeatedly when I have been trying to fix it. The problems I am experiencing are finally limited to runtime errors, but it seems to be generated by my loops. The errors I am getting are as follows:

java.lang.NullPointerException
at MyMenu.init(MyMenu.java:65)
at sun.applet.AppletPanel.run(AppletPanel.java434)
at java.lang.Thread.run(Thread.java:722)

As you can see, below the error is related to an initialization loop I have.

at this time I have spent nearly 2.5 weeks trying to fix this program, I am just desperate to hear that it something simple and I will not have to start all over again =(

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you have all of these

each one needs a corresponding
= new Component();

e.g.
title = new JLabel();

go through your code and make sure they're there, if not add them
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4544
    
    5

Creating an array doesn't populate it; each array element has its default value -- 0 for numeric primitives, false for boolean and null for reference types.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Panic about an Applet for a simple diner menu