// Set this to false to force a full panel paint\r
public void paintComponent(Graphics g)\r
{\r
- if (fastPaint || getWidth() != g.getClipBounds().width\r
- || getHeight() != g.getClipBounds().height)\r
+ if (img!=null\r
+ && (fastPaint || getWidth() != g.getClipBounds().width\r
+ || getHeight() != g.getClipBounds().height))\r
{\r
g.drawImage(img, 0, 0, this);\r
fastPaint = false;\r