JPanel () { final JPanel defaultValuePanel = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP, 4, 2, true, false)); final JBLabel inSignatureLabel = new JBLabel(PyBundle.message("refactoring.change.signature.dialog.default.value.checkbox"), UIUtil.ComponentStyle.SMALL); defaultValuePanel.add(inSignatureLabel, BorderLayout.WEST); myDefaultInSignature = new JCheckBox(); myDefaultInSignature.setSelected(((PyParameterTableModelItem)item).isDefaultInSignature()); myDefaultInSignature.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent event) { ((PyParameterTableModelItem)item).setDefaultInSignature(myDefaultInSignature.isSelected()); } }); myDefaultInSignature.addChangeListener(mySignatureUpdater); myDefaultInSignature.setEnabled(item.parameter.isNew()); defaultValuePanel.add(myDefaultInSignature, BorderLayout.EAST); return defaultValuePanel; }