Java Swing Icon getbtnIcon(String iconpath)

Here you can find the source of getbtnIcon(String iconpath)

Description

getbtn Icon

License

Apache License

Declaration

public static JButton getbtnIcon(String iconpath) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.ImageIcon;
import javax.swing.JButton;

public class Main {
    public static JButton getbtnIcon(String iconpath) {
        JButton button = new JButton();
        button.setIcon(new ImageIcon(iconpath));
        button.setBorder(null);/* w  ww . j  a  v  a2 s  .  com*/
        button.setFocusPainted(false);
        button.setContentAreaFilled(false);

        return button;
    }
}

Related

  1. createTransparentIcon(int width)
  2. darken(Icon icon)
  3. emptyIcon(final int width, final int height)
  4. getApplicationIcons()
  5. getBadgedIcon(Icon icon, Icon badge)
  6. getbtniconpresspress(String Iconpath1, String pressIconpath2, String pressIconpath3)
  7. getClosestIcon(Collection icons, int height)
  8. getDefaultIcon()
  9. getDefaultIcon()