import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JDialog;
+import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.JTabbedPane;
LookAndFeelWrapper lookAndFeelWrapper = (LookAndFeelWrapper) customLAFComboBox.getItemAt(lookAndFeelIndex);
if (lookAndFeelWrapper.getClassName().equals(lookAndFeel)) {
customLAFComboBox.setSelectedIndex(lookAndFeelIndex);
+ customLAFComboBox.setEnabled(true);
useCustomLAFCheckBox.setSelected(true);
break;
}
* Called when the “okay” button is clicked.
*/
private void actionOkay() {
+ if (useCustomControlFontCheckBox.isSelected()) {
+ if (controlFontList.getSelectedItem() == null) {
+ JOptionPane.showMessageDialog(this, I18n.get("configurationDialog.error.noControlFontSelected.message"), I18n.get("configurationDialog.error.noControlFontSelected.title"), JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ }
+ if (useCustomUserFontCheckBox.isSelected()) {
+ if (userFontList.getSelectedItem() == null) {
+ JOptionPane.showMessageDialog(this, I18n.get("configurationDialog.error.noUserFontSelected.message"), I18n.get("configurationDialog.error.noUserFontSelected.title"), JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ }
cancelled = false;
setVisible(false);
}