Java JButton Settings getbtnButton(String iconpath, String rolloverIconpath, String pressIconpath)

Here you can find the source of getbtnButton(String iconpath, String rolloverIconpath, String pressIconpath)

Description

getbtn Button

License

Apache License

Declaration

public static JButton getbtnButton(String iconpath, String rolloverIconpath, String pressIconpath) 

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 getbtnButton(String iconpath, String rolloverIconpath, String pressIconpath) {

        JButton button = new JButton();
        button.setIcon(new ImageIcon(iconpath));
        button.setRolloverIcon(new ImageIcon(rolloverIconpath));
        button.setPressedIcon(new ImageIcon(pressIconpath));
        button.setBorder(null);/*from w  w w. ja va 2  s  .co  m*/
        button.setFocusPainted(false);
        button.setContentAreaFilled(false);

        return button;

    }
}

Related

  1. findDescendantButtonWithText(Container root, String desiredText)
  2. fixButtonUI(AbstractButton button)
  3. formatButtonFromAction(Action a)
  4. getAbstractButton(Container owner, String text)
  5. getAllButtons(Component topComponent)
  6. getButton(Container c, String text)
  7. getButton(Container container, String text)
  8. getButton(String displayText, ActionListener actionListener)
  9. getButtonAsLink(String text)