1 |
alfonx |
474 |
package skrueger.swing; |
2 |
|
|
|
3 |
|
|
import javax.swing.Action; |
4 |
|
|
import javax.swing.BorderFactory; |
5 |
|
|
import javax.swing.JButton; |
6 |
|
|
|
7 |
|
|
public class SmallButton extends JButton { |
8 |
alfonx |
487 |
|
9 |
alfonx |
486 |
public SmallButton() { |
10 |
|
|
setBorder(BorderFactory.createEtchedBorder()); |
11 |
|
|
} |
12 |
alfonx |
474 |
|
13 |
|
|
public SmallButton(Action action, String tooltip) { |
14 |
alfonx |
487 |
this(action); |
15 |
|
|
setToolTipText(tooltip); |
16 |
alfonx |
474 |
} |
17 |
alfonx |
694 |
|
18 |
alfonx |
474 |
|
19 |
alfonx |
694 |
public SmallButton(String label) { |
20 |
|
|
this(); |
21 |
|
|
setText(label); |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
public SmallButton(String label, String toolTip) { |
27 |
|
|
this(); |
28 |
|
|
setText(label); |
29 |
|
|
setToolTipText(toolTip); |
30 |
|
|
} |
31 |
|
|
|
32 |
alfonx |
474 |
public SmallButton(Action action) { |
33 |
alfonx |
694 |
this(); |
34 |
|
|
setAction(action); |
35 |
alfonx |
474 |
} |
36 |
|
|
|
37 |
|
|
} |