Java Swing Icon item(String name, Icon icon)

Here you can find the source of item(String name, Icon icon)

Description

item

License

Open Source License

Declaration

public static JMenuItem item(String name, Icon icon) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.Icon;
import javax.swing.JMenuItem;

public class Main {
    public static JMenuItem item(String name, Icon icon) {
        JMenuItem item = new JMenuItem(name);
        item.setIcon(icon);/*from w w w.ja v  a2 s  . c  om*/

        return item;
    }
}

Related

  1. getSize(String graphIconPath)
  2. getTransparentIcon(int width)
  3. getVerBumpIcon()
  4. grayIcon(Icon icon)
  5. iconFromStream(final InputStream in)
  6. loadIcon(Class pRootClass, String strPath)
  7. loadIcon(ClassLoader classLoader, String path)
  8. loadIcon(String icon)
  9. loadIcon(String resourceName)