Following is the java example, which will demonstrate you the use of JToggleButton class:
Code:
public JToggleButton()
JToggleButton aToggleButtonEX = new JToggleButton();
public JToggleButton(Icon icon)
JToggleButton aToggleButtonEX = new JToggleButton(new DiamondIcon(Color.PINK))
public JToggleButton(Icon icon, boolean selected)
JToggleButton aToggleButtonEX = new JToggleButton(new DiamondIcon(Color.PINK), true);
public JToggleButton(String text)
JToggleButton aToggleButtonEX = new JToggleButton("Sicilian");
public JToggleButton(String text, Icon icon, boolean selected)
JToggleButton aToggleButtonEX = new JToggleButton("Stuffed Crust", new DiamondIcon(Color.PINK), true);
public JToggleButton(Action action)
Action action = ...;
JToggleButton aToggleButtonEX = new JToggleButton(action);
Bookmarks