Constructor JButton(Icon icon)
Member of:
javax.swing.JButton
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
btnDelete = new JButton(new ImageIcon(clazz.getResource("/uchicago/src/sim/images/Left.gif")));
2
private JButton right = new JButton(new ImageIcon("d:/home/nick/src/uchicago/src/sim/images/Right.gif"));
3
JButton b = new JButton(new ImageIcon(url));
4
fileButton = new JButton(new ImageIcon(getClass().getResource("images/OpenDoc.gif")));
5
JButton button = new JButton(readImageIcon(iconName));
6
JButton button = new JButton(new ImageIcon(image));
7
_button = new JButton(ReloadUIManager.getIcon(ReloadUIManager.ICON_OPEN));
8
backButton = new JButton(new ImageIcon(url));
9
runningIndicator = new JButton(stoppedIcon);
10
this.borderButton = new JButton(buttonIcon);
11
playButton = new JButton(DrawnIcon.getPlayIcon(true));
12
buttonPasteToClipboard = new JButton(new ImageIcon(org.jmathplot.gui.
13
JButton saveButton = new JButton(new ImageIcon("gui_images/apply.gif"));
14
case(Types.DATE) :lButton = new JButton(getApplication().LoadImage("dateeditor.gif"));
15
JButton saveB = (JButton) add( new JButton(Icons.saveIcon) );
16
_addButton = new JButton(ResourceLoader.lookupIconResource("NavigateForward"));
17
insertColumnBeforeButton= new JButton(new ImageIcon(url));
18
JButton buttonDelete = new JButton(new ImageIcon("images/trash.gif"));
19
upButton = new JButton(new ImageIcon(Preferences.get("UP_ARROW_IMAGE")));
20
JButton sortButton = new JButton(sortIcon);
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.