repainting works properly

This commit is contained in:
Ben Fry
2015-05-17 22:04:57 -04:00
parent 5d4a6645a2
commit 092ccc2814
2 changed files with 1 additions and 2 deletions

View File

@@ -598,6 +598,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
public void rebuildToolbar() {
toolbar.rebuild();
toolbar.revalidate(); // necessary to handle sub-components
}

View File

@@ -132,8 +132,6 @@ abstract public class EditorToolbar extends JPanel {
public void paintComponent(Graphics g) {
// label.setText(editor.getSketch().getName());
// super.paintComponent(g);
Dimension size = getSize();
g.drawImage(gradient, 0, 0, size.width, size.height, this);
}