JComponent () { JPanel _panel; JPanel _panel0; myWatchAccessCheckBox = new JCheckBox(JavaDebuggerBundle.message("label.field.breakpoint.properties.panel.field.access")); myWatchModificationCheckBox = new JCheckBox(JavaDebuggerBundle.message("label.field.breakpoint.properties.panel.field.modification")); DialogUtil.registerMnemonic(myWatchAccessCheckBox); DialogUtil.registerMnemonic(myWatchModificationCheckBox); Box watchBox = Box.createVerticalBox(); _panel = new JPanel(new BorderLayout()); _panel.add(myWatchAccessCheckBox, BorderLayout.NORTH); watchBox.add(_panel); _panel = new JPanel(new BorderLayout()); _panel.add(myWatchModificationCheckBox, BorderLayout.NORTH); watchBox.add(_panel); _panel = new JPanel(new BorderLayout()); _panel0 = new JPanel(new BorderLayout()); _panel0.add(watchBox, BorderLayout.CENTER); _panel0.add(Box.createHorizontalStrut(3), BorderLayout.WEST); _panel0.add(Box.createHorizontalStrut(3), BorderLayout.EAST); _panel.add(_panel0, BorderLayout.NORTH); _panel.setBorder(IdeBorderFactory.createTitledBorder(JavaDebuggerBundle.message("label.group.watch.events"))); ActionListener listener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JCheckBox toCheck = null; if (!myWatchAccessCheckBox.isSelected() && !myWatchModificationCheckBox.isSelected()) { Object source = e.getSource(); if (myWatchAccessCheckBox.equals(source)) { toCheck = myWatchModificationCheckBox; } else if (myWatchModificationCheckBox.equals(source)) { toCheck = myWatchAccessCheckBox; } if (toCheck != null) { toCheck.setSelected(true); } } } }; myWatchAccessCheckBox.addActionListener(listener); myWatchModificationCheckBox.addActionListener(listener); return _panel; }