JComponent () { JPanel _panel, _panel0; myEmulatedCheckBox = new JCheckBox(JavaDebuggerBundle.message("label.method.breakpoint.properties.panel.emulated")); myWatchEntryCheckBox = new JCheckBox(JavaDebuggerBundle.message("label.method.breakpoint.properties.panel.method.entry")); myWatchExitCheckBox = new JCheckBox(JavaDebuggerBundle.message("label.method.breakpoint.properties.panel.method.exit")); DialogUtil.registerMnemonic(myWatchEntryCheckBox); DialogUtil.registerMnemonic(myWatchExitCheckBox); Box watchBox = Box.createVerticalBox(); _panel = JBUI.Panels.simplePanel(); _panel.add(myEmulatedCheckBox, BorderLayout.NORTH); watchBox.add(_panel); _panel = new JPanel(new BorderLayout()); _panel.add(myWatchEntryCheckBox, BorderLayout.NORTH); watchBox.add(_panel); _panel = new JPanel(new BorderLayout()); _panel.add(myWatchExitCheckBox, 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 (!myWatchEntryCheckBox.isSelected() && !myWatchExitCheckBox.isSelected()) { Object source = e.getSource(); if (myWatchEntryCheckBox.equals(source)) { toCheck = myWatchExitCheckBox; } else if (myWatchExitCheckBox.equals(source)) { toCheck = myWatchEntryCheckBox; } if (toCheck != null) { toCheck.setSelected(true); } } } }; myWatchEntryCheckBox.addActionListener(listener); myWatchExitCheckBox.addActionListener(listener); return _panel; }