Hi Gerald, I have had such a problem earlier too but in my case I was trying to have my own JToolBar and when I was trying to add an action item it was throwing a null pointer exception because I was not doing a few things right in my extended class. If you have extended JDialog( I think you were trying to display a JDialog ) then do check to make sure you are doing the right things because in jdk1.2 and jdk1.3 some things have been implmented differently if you look at the source code you should be able to see those changes. If you are not extending JDialog and simply calling show then it gets interesting ( I assume you do check to make sure none of the items you add to JDialog are null and also before calling show as a precausion check to see if your JDialog is not null ) If you are creating a separate thread to create your JDialog then that may be also another reason. Posting your code would help before any further suggestions can be given. Thanks and Regards, Gary Grewal -----Original Message----- From: gerald fehringer To: 'Timothy Reaves' Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Sent: 4/26/01 12:38 PM Subject: AW: AW: suspicious exception Hello Timothy! Thanks for your answer but if it had been a simple NullPointerException I would not have posted the problem .. if you have a look at the stack trace you will notice "java.lang.NullPointerException: disposed component" in the first line .. i.e. "disposed component" is the message I'd like to get more info for ! Kind regards, Gerald. -----Urspr�ngliche Nachricht----- Von: Timothy Reaves [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Gesendet am: Donnerstag, 26. April 2001 19:30 An: [EMAIL PROTECTED] Betreff: Re: AW: suspicious exception gerald fehringer wrote: > Hello Timothy! > > Why do you think the code is poor? > Can you tell what causes that exception? > I think the code is poor because you are trying to use an uninitialized variable. And no, I can't tell what is causing it because you did not post the code where the exception is thrown. And the two lists you mailed the problem to are not 'How to learn Java' lists, they are for advanced users. I don't think you would fit this catagory. Here is a common example of what does cause this exception: class Foo{ private static String string; prublic static voidmain(String[] args){ System.out.println("The length of the string is: " + string.length()); } } When you run this class, an NullPointerException will be thrown becuase the String string was never initialized. But this is only one example of the many things that can cause this exception. _______________________________________________ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
