Java Swing Icon getIconCheckBox(String iconPath, String pressIconPath, String rolloverIconPath, String selectedIconPath)

Here you can find the source of getIconCheckBox(String iconPath, String pressIconPath, String rolloverIconPath, String selectedIconPath)

Description

get Icon Check Box

License

Apache License

Declaration

public static JCheckBox getIconCheckBox(String iconPath, String pressIconPath, String rolloverIconPath,
            String selectedIconPath) 

Method Source Code

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

import javax.swing.ImageIcon;

import javax.swing.JCheckBox;

public class Main {
    public static JCheckBox getIconCheckBox(String iconPath, String pressIconPath, String rolloverIconPath,
            String selectedIconPath) {
        JCheckBox checkBox = new JCheckBox();
        checkBox.setIcon(new ImageIcon(iconPath));
        checkBox.setPressedIcon(new ImageIcon(pressIconPath));
        checkBox.setRolloverIcon(new ImageIcon(rolloverIconPath));
        checkBox.setSelectedIcon(new ImageIcon(selectedIconPath));
        checkBox.setBorder(null);//from   ww w  .ja  va2s  .c  o m
        checkBox.setFocusPainted(false);
        checkBox.setContentAreaFilled(false);
        return checkBox;
    }
}

Related

  1. getIcon(String name)
  2. getIcon(String name)
  3. getIcon(String name)
  4. getIcon(String name, boolean isGrayIcon)
  5. getIcon(String name, ClassLoader classLoader)
  6. getIconFromExtension(String f, boolean folder)
  7. getIconInterTrial()
  8. getIcono()
  9. getPressedExitIcon(int x, int y)