/** Creates a JRadioButtonMenuItem for the Look and Feel menu */ private JMenuItem createLafMenuItem( JMenu menu, String label, char mnemonic, String accessibleDescription, String laf) { JMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(label)); lafMenuGroup.add(mi); mi.setMnemonic(mnemonic); mi.getAccessibleContext().setAccessibleDescription(accessibleDescription); mi.addActionListener(new ChangeLookAndFeelAction(this, laf)); mi.setEnabled(isAvailableLookAndFeel(laf)); return mi; }
/** Creates a JRadioButtonMenuItem for the Themes menu */ private JMenuItem createThemesMenuItem( JMenu menu, String label, char mnemonic, String accessibleDescription, DefaultMetalTheme theme) { JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(label)); themesMenuGroup.add(mi); mi.setMnemonic(mnemonic); mi.getAccessibleContext().setAccessibleDescription(accessibleDescription); mi.addActionListener(new ChangeThemeAction(this, theme)); return mi; }