Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 4172)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 4175)
@@ -277,4 +277,5 @@
         viewMenu.add(wireframe);
         wireframe.setAccelerator(wireFrameToggleAction.getShortcut().getKeyStroke());
+        wireFrameToggleAction.addButtonModel(wireframe.getModel());
 
         viewMenu.addSeparator();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 4172)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 4175)
@@ -13,4 +13,5 @@
 import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
@@ -27,4 +28,5 @@
 
 import javax.swing.AbstractAction;
+import javax.swing.DefaultButtonModel;
 import javax.swing.DefaultListSelectionModel;
 import javax.swing.JCheckBox;
@@ -97,8 +99,22 @@
         JLabel wfLabel = new JLabel(tr("Wireframe View"), ImageProvider.get("dialogs/mappaint", "wireframe_small"), JLabel.HORIZONTAL);
         wfLabel.setFont(wfLabel.getFont().deriveFont(Font.PLAIN));
-        cbWireframe.setFont(cbWireframe.getFont().deriveFont(Font.PLAIN));
-        cbWireframe.setAction(Main.main.menu.wireFrameToggleAction);
+
+        cbWireframe.setModel(new DefaultButtonModel() {
+            @Override
+            public void setSelected(boolean b) {
+                super.setSelected(b);
+                tblStyles.setEnabled(!b);
+                onoffAction.updateEnabledState();
+                upAction.updateEnabledState();
+                downAction.updateEnabledState();
+            }
+        });
+        cbWireframe.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                Main.main.menu.wireFrameToggleAction.actionPerformed(null);
+            }
+        });
         cbWireframe.setBorder(new EmptyBorder(new Insets(1,1,1,1)));
-        cbWireframe.setText("");
+
         tblStyles = new StylesTable(model);
         tblStyles.setSelectionModel(selectionModel= new DefaultListSelectionModel());
@@ -114,5 +130,4 @@
         tblStyles.setShowGrid(false);
         tblStyles.setIntercellSpacing(new Dimension(0, 0));
-        cbWireframe.addChangeListener(tblStyles);
 
         JPanel p = new JPanel(new GridBagLayout());
@@ -122,9 +137,11 @@
 
         pnl.add(new JScrollPane(p), BorderLayout.CENTER);
+
         pnl.add(buildButtonRow(), BorderLayout.SOUTH);
+
         add(pnl, BorderLayout.CENTER);
     }
 
-    protected class StylesTable extends JTable implements ChangeListener{
+    protected static class StylesTable extends JTable {
 
         public StylesTable(TableModel dm) {
@@ -140,9 +157,4 @@
             rect.setLocation(rect.x - pt.x, rect.y - pt.y);
             viewport.scrollRectToVisible(rect);
-        }
-
-        @Override
-        public void stateChanged(ChangeEvent e) {
-            setEnabled(!cbWireframe.isSelected());
         }
     }
@@ -158,8 +170,4 @@
         selectionModel.addListSelectionListener(upAction);
         selectionModel.addListSelectionListener(downAction);
-        cbWireframe.addChangeListener(onoffAction);
-        cbWireframe.addChangeListener(upAction);
-        cbWireframe.addChangeListener(downAction);
-
         p.add(new SideButton(onoffAction));
         p.add(new SideButton(upAction));
@@ -172,11 +180,11 @@
     @Override
     public void showNotify() {
-        cbWireframe.setAction(Main.main.menu.wireFrameToggleAction);
         MapPaintStyles.addMapPaintSylesUpdateListener(model);
+        Main.main.menu.wireFrameToggleAction.addButtonModel(cbWireframe.getModel());
     }
 
     @Override
     public void hideNotify() {
-        cbWireframe.setAction(null);
+        Main.main.menu.wireFrameToggleAction.removeButtonModel(cbWireframe.getModel());
         MapPaintStyles.removeMapPaintSylesUpdateListener(model);
     }
@@ -296,20 +304,5 @@
     }
 
-    protected abstract class EventListeningAction extends AbstractAction implements ListSelectionListener, ChangeListener {
-
-        protected abstract void updateEnabledState();
-
-        @Override
-        public void valueChanged(ListSelectionEvent e) {
-            updateEnabledState();
-        }
-
-        @Override
-        public void stateChanged(ChangeEvent e) {
-            updateEnabledState();
-        }
-    }
-
-    protected class OnOffAction extends EventListeningAction {
+    protected class OnOffAction extends AbstractAction implements ListSelectionListener {
         public OnOffAction() {
             putValue(SHORT_DESCRIPTION, tr("Turn selected styles on or off"));
@@ -318,7 +311,11 @@
         }
 
-        @Override
         protected void updateEnabledState() {
             setEnabled(!cbWireframe.isSelected() && tblStyles.getSelectedRowCount() > 0);
+        }
+
+        @Override
+        public void valueChanged(ListSelectionEvent e) {
+            updateEnabledState();
         }
 
@@ -337,5 +334,5 @@
      * The action to move down the currently selected entries in the list.
      */
-    protected class MoveUpDownAction extends EventListeningAction {
+    protected class MoveUpDownAction extends AbstractAction implements ListSelectionListener {
 
         final int increment;
@@ -348,5 +345,4 @@
         }
 
-        @Override
         public void updateEnabledState() {
             int[] sel = tblStyles.getSelectedRows();
@@ -364,4 +360,8 @@
             }
             model.ensureSelectedIsVisible();
+        }
+
+        public void valueChanged(ListSelectionEvent e) {
+            updateEnabledState();
         }
     }
