UIManager.LookAndFeelInfo[] lookAndFeelInfos = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo lookAndFeelInfo : lookAndFeelInfos) {
JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(lookAndFeelInfo.getName(),
UIManager.getLookAndFeel().getName().equalsIgnoreCase(lookAndFeelInfo.getName()));
menuItem.setActionCommand(lookAndFeelInfo.getClassName());
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
try {
UIManager.setLookAndFeel(e.getActionCommand());
updateUI(e.getActionCommand());