void () { final JBCheckBox colored = new JBCheckBox(PyBundle.message("debugger.data.view.colored.cells")); final JBCheckBox resize = new JBCheckBox(PyBundle.message("debugger.data.view.resize.automatically")); resize.setSelected(PropertiesComponent.getInstance(myProject).getBoolean(PyDataView.AUTO_RESIZE, true)); colored.setSelected(PropertiesComponent.getInstance(myProject).getBoolean(PyDataView.COLORED_BY_DEFAULT, true)); colored.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myDataViewerPanel.setColored(colored.isSelected()); myDataViewerPanel.updateUI(); } }); resize.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myDataViewerPanel.resize(resize.isSelected()); myDataViewerPanel.updateUI(); } }); GridBagConstraints checkBoxConstraints = createCheckBoxConstraints(); checkBoxConstraints.gridy = 1; myMainPanel.add(colored, checkBoxConstraints); checkBoxConstraints.gridy = 2; myMainPanel.add(resize, checkBoxConstraints); }