Here you can find the source of getbtniconpresspress(String Iconpath1, String pressIconpath2, String pressIconpath3)
public static JButton getbtniconpresspress(String Iconpath1, String pressIconpath2, String pressIconpath3)
//package com.java2s; //License from project: Apache License import javax.swing.ImageIcon; import javax.swing.JButton; public class Main { public static JButton getbtniconpresspress(String Iconpath1, String pressIconpath2, String pressIconpath3) { JButton button = new JButton(); button.setIcon(new ImageIcon(Iconpath1)); button.setPressedIcon(new ImageIcon(pressIconpath2)); button.setPressedIcon(new ImageIcon(pressIconpath3)); button.setBorder(null);/* w ww. j a va2 s .c o m*/ button.setFocusPainted(false); button.setContentAreaFilled(false); return button; } }