import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JCheckBox; public class Main { public static void main(String[] argv) throws Exception { JCheckBox checkbox = new JCheckBox(); Icon rollIcon = new ImageIcon("roll-icon.gif"); checkbox.setRolloverIcon(rollIcon); } }