• 0

a noob with java trying to use JOptionPane with exception handling


Question

hmm...to all neowin programming experts here....

try to help me take a look at my code. its all my effort on it..but in the end... :(

when i use joptionpane with it...when running it exits something like this. fyi i'm using jcreator.

please help...thank you very much..

like in my Food List menu...after i clicked Cancel or Close, this comes out in the general output.

--------------------Configuration: <Default>--------------------
Exception in thread "main" java.lang.NullPointerException
	at PerfectPartyCatering.FoodList(PerfectPartyCatering.java:187)
	at PerfectPartyCatering.OrderModule(PerfectPartyCatering.java:96)
	at PerfectPartyCatering.main(PerfectPartyCatering.java:60)

Process completed.

i know that something called exception handling should be implemented, but i have no idea on how to do it.

EDIT: please please help me..... :s

PerfectPartyCatering.zip

Edited by darren89
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I haven't got the line numbers, so I don't know exactly which line is throwing the Exception. If it looks like FoodList is the problem, try printing it to System.out before you try to use it.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.