Java 类javax.swing.plaf.metal.MetalTheme 实例源码

项目:OpenJSharp    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:jdk8u-jdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:openjdk-jdk10    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:openjdk9    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:jdk8u_jdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:lookaside_java-1.8.0-openjdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:confluence.keygen    文件:PlasticLookAndFeel.java   
public static List getInstalledThemes()
/*  518:     */   {
/*  519: 795 */     if (null == installedThemes) {
/*  520: 796 */       installDefaultThemes();
/*  521:     */     }
/*  522: 798 */     Collections.sort(installedThemes, new Comparator()
/*  523:     */     {
/*  524:     */       public int compare(Object o1, Object o2)
/*  525:     */       {
/*  526: 800 */         MetalTheme theme1 = (MetalTheme)o1;
/*  527: 801 */         MetalTheme theme2 = (MetalTheme)o2;
/*  528: 802 */         return theme1.getName().compareTo(theme2.getName());
/*  529:     */       }
/*  530: 805 */     });
/*  531: 806 */     return installedThemes;
/*  532:     */   }
项目:confluence.keygen    文件:PlasticLookAndFeel.java   
public static PlasticTheme getPlasticTheme()
/*  565:     */   {
/*  566: 887 */     if (LookUtils.IS_JAVA_5_OR_LATER)
/*  567:     */     {
/*  568: 888 */       MetalTheme theme = getCurrentTheme0();
/*  569: 889 */       if ((theme instanceof PlasticTheme)) {
/*  570: 890 */         return (PlasticTheme)theme;
/*  571:     */       }
/*  572:     */     }
/*  573: 892 */     PlasticTheme uimanagerTheme = (PlasticTheme)UIManager.get(THEME_KEY);
/*  574: 893 */     if (uimanagerTheme != null) {
/*  575: 894 */       return uimanagerTheme;
/*  576:     */     }
/*  577: 896 */     PlasticTheme initialTheme = createMyDefaultTheme();
/*  578: 897 */     setPlasticTheme(initialTheme);
/*  579: 898 */     return initialTheme;
/*  580:     */   }
项目:metasfresh    文件:PLAFEditorPanel.java   
/**
 * Handle theme selection changed
 * @param e
 */
private void themeSelectionChanged(final ListSelectionEvent e)
{
    if (m_setting)
        return;
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    try
    {
        ValueNamePair laf = lookList.getSelectedValue();
        ValueNamePair theme = themeList.getSelectedValue();
        LookAndFeel currentLaf = UIManager.getLookAndFeel();
        MetalTheme currentTheme = MetalLookAndFeel.getCurrentTheme();
        AdempierePLAF.setPLAF(laf, theme, false);
        previewPanel.refresh(currentLaf, currentTheme);
        SwingUtilities.updateComponentTreeUI(previewPanel);
        updatePreviewComponents();
        setLFSelection();
    }
    finally
    {
        setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        this.repaint();
    }
}
项目:metasfresh    文件:PLAFEditorPanel.java   
/**
 * Handle look and feel selection changed
 * @param e
 */
private void lookAndFeelSelectionChanged(final ListSelectionEvent e)
{
    if (m_setting)
        return;
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    try
    {
        ValueNamePair laf = lookList.getSelectedValue();
        LookAndFeel currentLaf = UIManager.getLookAndFeel();
        MetalTheme currentTheme = MetalLookAndFeel.getCurrentTheme();
        AdempierePLAF.setPLAF(laf, null, false);
        previewPanel.refresh(currentLaf, currentTheme);
        SwingUtilities.updateComponentTreeUI(previewPanel);
        updatePreviewComponents();
        setLFSelection();
    }
    finally
    {
        setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        this.repaint();
    }
}
项目:infobip-open-jdk-8    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:jdk8u-dev-jdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:minimal-j    文件:LookAndFeelAction.java   
@SuppressWarnings("unchecked")
@Override
public void actionPerformed(ActionEvent actionEvent) {
    try {
        String lookAndFeelClassName = actionEvent.getActionCommand();
        Class<LookAndFeel> lookAndFeelClass = (Class<LookAndFeel>) Class.forName(lookAndFeelClassName);
        LookAndFeel lookAndFeel = lookAndFeelClass.newInstance();
        if (lookAndFeel instanceof MetalThemeProvider) {
            MetalTheme theme = ((MetalThemeProvider) lookAndFeel).getMetalTheme();
            MetalLookAndFeel.setCurrentTheme(theme);
        }
        UIManager.setLookAndFeel(lookAndFeel);
        for (Window window : JFrame.getWindows()) {
            SwingUtilities.updateComponentTreeUI(window);
            window.validate();
            window.repaint();
        }
    } catch (Exception exception) {
        exception.printStackTrace();
        JOptionPane.showMessageDialog(null, "Can't change look and feel", "Invalid PLAF", JOptionPane.ERROR_MESSAGE);
    }
}
项目:jdk7-jdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:openjdk-source-code-learn    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:OLD-OpenJDK8    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:openjdk-jdk7u-jdk    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:IBMDataMovementTool    文件:PlasticLookAndFeel.java   
/**
 * Lazily initializes and returns the {@code List} of installed
    * color themes.
    *
    * @return a list of installed color/font themes
 */
public static List getInstalledThemes() {
    if (null == installedThemes) {
           installDefaultThemes();
       }

    Collections.sort(installedThemes, new Comparator() {
        public int compare(Object o1, Object o2) {
            MetalTheme theme1 = (MetalTheme) o1;
            MetalTheme theme2 = (MetalTheme) o2;
            return theme1.getName().compareTo(theme2.getName());
        }
    });

    return installedThemes;
}
项目:openjdk-icedtea7    文件:MetalThemeMenu.java   
@SuppressWarnings("LeakingThisInConstructor")
public MetalThemeMenu(String name, MetalTheme[] themeArray) {
    super(name);
    themes = themeArray;
    ButtonGroup group = new ButtonGroup();
    for (int i = 0; i < themes.length; i++) {
        JRadioButtonMenuItem item = new JRadioButtonMenuItem(themes[i].
                getName());
        group.add(item);
        add(item);
        item.setActionCommand(i + "");
        item.addActionListener(this);
        if (i == 0) {
            item.setSelected(true);
        }
    }

}
项目:Moenagade    文件:MetalLayoutStyle.java   
public MetalLayoutStyle() {
    isOcean = false;
    try {
        Method method = MetalLookAndFeel.class.
            getMethod("getCurrentTheme", (Class[])null);
        isOcean = ((MetalTheme)method.invoke(null, (Object[])null)).
                  getName() == "Ocean";
    } catch (NoSuchMethodException nsme) {
    } catch (IllegalAccessException iae) {
    } catch (IllegalArgumentException iae2) {
    } catch (InvocationTargetException ite) {
    }
}
项目:OpenJSharp    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:jdk8u-jdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:openjdk-jdk10    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:openjdk9    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:jdk8u_jdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:lookaside_java-1.8.0-openjdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:beautyeye    文件:SwingSet2.java   
/**
     * Creates a JRadioButtonMenuItem for the Themes menu.
     *
     * @param menu the menu
     * @param label the label
     * @param mnemonic the mnemonic
     * @param accessibleDescription the accessible description
     * @param theme the theme
     * @return the j menu item
     */
    public JMenuItem createThemesMenuItem(JMenu menu, String label, String mnemonic,
            String accessibleDescription, MetalTheme theme) {
        JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label)));
        themesMenuGroup.add(mi);
        mi.setMnemonic(getMnemonic(mnemonic));
        mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription));
//      mi.addActionListener(new ChangeThemeAction(this, theme));

        return mi;
    }
项目:metasfresh    文件:PLAFEditorPanel.java   
/**
 * Refresh look and feel preview, reset to original setting after
 * refresh.
 * @param currentLaf Current Look and feel
 * @param currentTheme Current Theme
 */
void refresh(LookAndFeel currentLaf, MetalTheme currentTheme)
{
    this.laf = currentLaf;
    this.theme = currentTheme;
    capture = true;
}
项目:metasfresh    文件:AdempierePLAF.java   
/**
 * Invoke the correct method to set current metal based theme.
 * Supported look and feel are Metal, Plastic and Compiere.  
 * @param laf Metal based look and feel
 * @param theme Metal based theme
 */
static void setCurrentMetalTheme(final MetalLookAndFeel laf, final MetalTheme theme)
{
    if (laf instanceof AdempiereLookAndFeel && theme instanceof PlasticTheme)
    {
        AdempiereLookAndFeel.setCurrentTheme((PlasticTheme)theme);
    }
    else
    {
        MetalLookAndFeel.setCurrentTheme(theme);
    }
}
项目:infobip-open-jdk-8    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:jdk8u-dev-jdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:jdk7-jdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:openjdk-source-code-learn    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:RipplePower    文件:MetalLayoutStyle.java   
public MetalLayoutStyle() {
    isOcean = false;
    try {
        Method method = MetalLookAndFeel.class.getMethod("getCurrentTheme", (Class[]) null);
        isOcean = ((MetalTheme) method.invoke(null, (Object[]) null)).getName() == "Ocean";
    } catch (NoSuchMethodException nsme) {
    } catch (IllegalAccessException iae) {
    } catch (IllegalArgumentException iae2) {
    } catch (InvocationTargetException ite) {
    }
}
项目:OLD-OpenJDK8    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:openjdk-jdk7u-jdk    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:Geokuk    文件:LafSupport.java   
/**
 * Creates a JRadioButtonMenuItem for the Themes menu
 */
private static JMenuItem createThemesMenuItem(JMenu menu, String label, char mnemonic, MetalTheme theme) {
  JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(label));
  themesMenuGroup.add(mi);
  mi.addActionListener(new ChangeThemeAction(theme));
  mi.setMnemonic(mnemonic);
  return mi;
}
项目:IBMDataMovementTool    文件:PlasticLookAndFeel.java   
/**
 * Lazily initializes and returns the PlasticTheme.
 *
 * @return the current PlasticTheme
 */
public static PlasticTheme getPlasticTheme() {
    MetalTheme theme = getCurrentTheme();
    if (theme instanceof PlasticTheme) {
        return (PlasticTheme) theme;
    }
    PlasticTheme initialTheme = createMyDefaultTheme();
    setPlasticTheme(initialTheme);
    return initialTheme;
}
项目:openjdk-icedtea7    文件:MetalThemeMenu.java   
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
项目:OpenJSharp    文件:MetalworksFrame.java   
protected void buildMenus() {
    menuBar = new JMenuBar();
    menuBar.setOpaque(true);
    JMenu file = buildFileMenu();
    JMenu edit = buildEditMenu();
    JMenu views = buildViewsMenu();
    JMenu speed = buildSpeedMenu();
    JMenu help = buildHelpMenu();

    // load a theme from a text file
    MetalTheme myTheme = null;
    try {
        InputStream istream = getClass().getResourceAsStream(
                "/resources/MyTheme.theme");
        myTheme = new PropertiesMetalTheme(istream);
    } catch (NullPointerException e) {
        System.out.println(e);
    }

    // build an array of themes
    MetalTheme[] themes = { new OceanTheme(),
        new DefaultMetalTheme(),
        new GreenMetalTheme(),
        new AquaMetalTheme(),
        new KhakiMetalTheme(),
        new DemoMetalTheme(),
        new ContrastMetalTheme(),
        new BigContrastMetalTheme(),
        myTheme };

    // put the themes in a menu
    JMenu themeMenu = new MetalThemeMenu("Theme", themes);

    menuBar.add(file);
    menuBar.add(edit);
    menuBar.add(views);
    menuBar.add(themeMenu);
    menuBar.add(speed);
    menuBar.add(help);
    setJMenuBar(menuBar);
}