Re: Null pointer exception with Java 1.4.2, ok with 1.5

From: Andrew Thompson (SeeMySites_at_www.invalid)
Date: 11/27/04


Date: Sat, 27 Nov 2004 18:00:50 GMT

On Sat, 27 Nov 2004 17:49:34 GMT, Luke wrote:

> On Sat, 27 Nov 2004 17:37:46 GMT, Luke <lukeita@gawab.com> wrote:

> Ok added just a check:
>
> if (image != null)
> // paint image...

Yep. That's what I was thinking. Ignore my other post.

> and it works :-)
> Why in Java 1.5 I had no problems?

I'd say it comes down to a matter of timing. The 1.4 code
gets to the first 'paintComponent' before the image is loaded,
whereas 1.5 loads the image first.

> thanks Andrew!

No worries. ;-)

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane


Relevant Pages

  • [OT] Re: Is Ruby RAILS really suitable for modern Web Development ?
    ... > Thanks Luke ... Rails has AJAX support built-in. ... methods are Flash and Java. ...
    (comp.lang.ruby)
  • Re: Competing against Borland Database Engine..
    ... I suspect that coming from a JAVA perspective, you are being a little harsh ... >> Oh please Luke! ... I use Java Annotations, but only to provide metadata for the ... >> You need some sort of syntax for class members if you're going to do ...
    (comp.databases.pick)
  • Re: ATWT-- Jades Deception?
    ... Money from Holden and a descent place to freeload. ... Java ... but I've been watching her with Luke, who seems to be disgusted with ...
    (rec.arts.tv.soaps.cbs)
  • Re: JSP vs. Javascript
    ... Robert M. Gary wrote: ... in Java and C++ for more than 10 years now and am just now getting into web based stuff. ... I'm familiar with EJB technologies but it turns out that GoDaddy doesn't support J2EE stuff. ... Luke ...
    (comp.lang.java.programmer)