/Users/lyon/j4p/src/bookExamples/ch26Graphics/carl/logPolar/BackGroundColorButton.java
|
1 package bookExamples.ch26Graphics.carl.logPolar;
2
3
4 class BackGroundColorButton extends gui.run.RunButton {
5 java.awt.Color color;
6 private Controller main;
7
8 public BackGroundColorButton(Controller main) {
9 super("Set Background Color");
10 this.main = main;
11 }
12
13 public void run() {
14 main.getLogic().getPanDisplay().setBackground(
15 javax.swing.JColorChooser.showDialog(this, "Choose a color", color));
16 main.getLogic().getPanDisplay().repaint();
17 }
18 }
19