return;\r
}\r
\r
- if(oldHeight!=imgHeight)\r
+ if(oldHeight!=imgHeight || image.getWidth(this)!=getWidth())\r
{\r
image = new BufferedImage(getWidth(), imgHeight,\r
BufferedImage.TYPE_INT_RGB);\r
- gg = (Graphics2D) image.getGraphics();\r
}\r
\r
+ gg = (Graphics2D) image.getGraphics();\r
//Fill in the background\r
gg.setColor(Color.white);\r
gg.fillRect(0, 0, getWidth(), imgHeight);\r