Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 24870)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 24871)
@@ -13,5 +13,4 @@
 import javax.swing.JRadioButton;
 
-
 import java.util.EnumMap;
 import java.util.Iterator;
@@ -23,5 +22,5 @@
 
 	private OSeaMAction dlg;
-	private ButtonGroup colourButtons = null;
+	private ButtonGroup colourButtons = new ButtonGroup();
 	public JRadioButton offButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/OffButton.png")));
 	public JRadioButton whiteButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WhiteButton.png")));
@@ -34,80 +33,46 @@
 	public JRadioButton violetButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/VioletButton.png")));
 	public JRadioButton blackButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/BlackButton.png")));
-	private ActionListener alColour = null;
 	private EnumMap<Col, JRadioButton> colours = new EnumMap<Col, JRadioButton>(Col.class);
+	private ActionListener alColour = new ActionListener() {
+		public void actionPerformed(java.awt.event.ActionEvent e) {
+			Iterator<Col> it = colours.keySet().iterator();
+			while (it.hasNext()) {
+				Col col = it.next();
+				JRadioButton button = colours.get(col);
+				if (button.isSelected()) {
+					button.setBorderPainted(true);
+				} else
+					button.setBorderPainted(false);
+			}
+		}
+	};
 
 	public PanelCol(OSeaMAction dia) {
 		dlg = dia;
 		this.setLayout(null);
-		this.add(getButton(offButton, 0, 0, 34, 16, "No colour", Col.UNKNOWN), null);
-		this.add(getButton(whiteButton, 0, 16, 34, 16, "White", Col.WHITE), null);
-		this.add(getButton(redButton, 0, 32, 34, 16, "Red", Col.RED), null);
-		this.add(getButton(orangeButton, 0, 48, 34, 16, "Orange", Col.ORANGE), null);
-		this.add(getButton(amberButton, 0, 64, 34, 16, "Amber", Col.AMBER), null);
-		this.add(getButton(yellowButton, 0, 80, 34, 16, "Yellow", Col.YELLOW), null);
-		this.add(getButton(greenButton, 0, 96, 34, 16, "Green", Col.GREEN), null);
-		this.add(getButton(blueButton, 0, 112, 34, 16, "Blue", Col.BLUE), null);
-		this.add(getButton(violetButton, 0, 128, 34, 16, "Violet", Col.VIOLET), null);
-		this.add(getButton(blackButton, 0, 144, 34, 16, "Black", Col.BLACK), null);
-		colourButtons = new ButtonGroup();
-		colourButtons.add(offButton);
-		colourButtons.add(whiteButton);
-		colourButtons.add(redButton);
-		colourButtons.add(orangeButton);
-		colourButtons.add(amberButton);
-		colourButtons.add(yellowButton);
-		colourButtons.add(greenButton);
-		colourButtons.add(blueButton);
-		colourButtons.add(violetButton);
-		colourButtons.add(blackButton);
-		alColour = new ActionListener() {
-			public void actionPerformed(java.awt.event.ActionEvent e) {
-				Iterator<Col> it = colours.keySet().iterator();
-				while (it.hasNext()) {
-					Col col = it.next();
-					JRadioButton button = colours.get(col);
-					if (button.isSelected()) {
-						switch (col) {
-						case UNKNOWN: {
-							break;
-						}
-						}
-						button.setBorderPainted(true);
-					} else button.setBorderPainted(false);
-				}
-/*				offButton.setBorderPainted(offButton.isSelected());
-				whiteButton.setBorderPainted(whiteButton.isSelected());
-				redButton.setBorderPainted(redButton.isSelected());
-				orangeButton.setBorderPainted(orangeButton.isSelected());
-				amberButton.setBorderPainted(amberButton.isSelected());
-				yellowButton.setBorderPainted(yellowButton.isSelected());
-				greenButton.setBorderPainted(greenButton.isSelected());
-				blueButton.setBorderPainted(blueButton.isSelected());
-				violetButton.setBorderPainted(violetButton.isSelected());
-				blackButton.setBorderPainted(blackButton.isSelected());
-*/			}
-		};
-		offButton.addActionListener(alColour);
-		whiteButton.addActionListener(alColour);
-		redButton.addActionListener(alColour);
-		orangeButton.addActionListener(alColour);
-		amberButton.addActionListener(alColour);
-		yellowButton.addActionListener(alColour);
-		greenButton.addActionListener(alColour);
-		blueButton.addActionListener(alColour);
-		violetButton.addActionListener(alColour);
-		blackButton.addActionListener(alColour);
+		this.add(getColButton(offButton, 0, 0, 34, 16, "No colour", Col.UNKNOWN), null);
+		this.add(getColButton(whiteButton, 0, 16, 34, 16, "White", Col.WHITE), null);
+		this.add(getColButton(redButton, 0, 32, 34, 16, "Red", Col.RED), null);
+		this.add(getColButton(orangeButton, 0, 48, 34, 16, "Orange", Col.ORANGE), null);
+		this.add(getColButton(amberButton, 0, 64, 34, 16, "Amber", Col.AMBER), null);
+		this.add(getColButton(yellowButton, 0, 80, 34, 16, "Yellow", Col.YELLOW), null);
+		this.add(getColButton(greenButton, 0, 96, 34, 16, "Green", Col.GREEN), null);
+		this.add(getColButton(blueButton, 0, 112, 34, 16, "Blue", Col.BLUE), null);
+		this.add(getColButton(violetButton, 0, 128, 34, 16, "Violet", Col.VIOLET), null);
+		this.add(getColButton(blackButton, 0, 144, 34, 16, "Black", Col.BLACK), null);
 	}
 
 	public void clearSelections() {
 		colourButtons.clearSelection();
-		alColour.actionPerformed(null);
+		offButton.doClick();
 	}
 
-	private JRadioButton getButton(JRadioButton button, int x, int y, int w, int h, String tip, Col col) {
+	private JRadioButton getColButton(JRadioButton button, int x, int y, int w, int h, String tip, Col col) {
 		button.setBounds(new Rectangle(x, y, w, h));
 		button.setBorder(BorderFactory.createLineBorder(Color.magenta, 2));
 		button.setToolTipText(tr(tip));
+		button.addActionListener(alColour);
 		colours.put(col, button);
+		colourButtons.add(button);
 		return button;
 	}
