> > Ok, but did I not initialize it on the line:
>
> > Font nameFont = getFont().deriveFont(1,30);getFont() requires a native peer, and that won't exist until the
> component has been shown.
Justin,
This is why code like that can be troublesome. If getFont() returns
null, as it is in this case, in your code there's no way to stop the
call to deriveFont(1, 30) and thus your NullPointerException.
While more verbose, something like this is a little more
error-friendly:
Font nameFont = getFont();
if (nameFont != null)
nameFont = nameFont.deriveFont(1, 30);
The burden is on you to then provide graceful handling of this error
condition, but at least your user won't see a NullPointerException...

Signature
Joe Attardi
jattardi@gmail.com