Java JCheckBox create

Description

Java JCheckBox create

constructor:public JCheckBox()
usage      :JCheckBox aCheckBox = new JCheckBox();

constructor:public JCheckBox(Icon icon)
usage      :JCheckBox aCheckBox = new JCheckBox(new DiamondIcon(Color.RED, false));
            aCheckBox.setSelectedIcon(new DiamondIcon(Color.PINK, true));

constructor:public JCheckBox(Icon icon, boolean selected)
usage      :JCheckBox aCheckBox = new JCheckBox(new DiamondIcon(Color.RED, false), true);
            aCheckBox.setSelectedIcon(new DiamondIcon(Color.PINK, true));

constructor:public JCheckBox(String text)
usage      :JCheckBox aCheckBox = new JCheckBox("Spinach");

constructor:public JCheckBox(String text, boolean selected)
usage      :JCheckBox aCheckBox = new JCheckBox("Onions", true);

constructor:public JCheckBox(String text, Icon icon)
usage      :JCheckBox aCheckBox = new JCheckBox("Garlic", new DiamondIcon(Color.RED, false));
            aCheckBox.setSelectedIcon(new DiamondIcon(Color.PINK, true));

constructor:public JCheckBox(String text, Icon icon, boolean selected)
usage      :JCheckBox aCheckBox = new JCheckBox("Anchovies", new DiamondIcon(Color.RED,  false), true);
            aCheckBox.setSelectedIcon(new DiamondIcon(Color.PINK, true));

constructor:public JCheckBox(Action action)
usage      :Action action = ...;/*  ww w.j  a v  a2  s .co  m*/
            JCheckBox aCheckBox = new JCheckBox(action);



PreviousNext

Related