public class AnnotationLabels\r
extends Panel implements ActionListener, MouseListener, MouseMotionListener\r
{\r
+ Image image;\r
boolean active = false;\r
AlignmentPanel ap;\r
AlignViewport av;\r
}\r
}\r
\r
+ public void update(Graphics g)\r
+ {\r
+ paint(g);\r
+ }\r
+\r
public void paint(Graphics g)\r
{\r
- drawComponent(g, getSize().width);\r
+ int w = getSize().width;\r
+ if (image == null || w != image.getWidth(this))\r
+ {\r
+ image = createImage(w, ap.annotationPanel.getSize().height);\r
+ }\r
+\r
+ drawComponent(image.getGraphics(), w);\r
+ g.drawImage(image,0,0,this);\r
}\r
\r
public void drawComponent(Graphics g, int width)\r