dcsimg
Graphics object NullPointerException
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   don_parrish
Posted On:   Tuesday, March 20, 2001 09:06 AM

Applet in JBuilder4 code:

Graphics projectPanelGraphics;
Panel projectPanel = new Panel();
this.getContentPane().add
(projectPanel);
projectPanelGraphics
= projectPanel.getGraphics();

then error on:

projectPanelGraphics.setColor
(Color.gray);

I have successfully used this code in the past and have even tried an old applet that still works elsewhere...Is this a JDK issue? Thanks.

About | Sitemap | Contact