package skrueger.swing; import java.awt.Font; import javax.swing.Action; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JLabel; public class ThinButton extends JButton { public static final float BUTTON_FONT_SIZE = 11; public static final int BUTTON_FONT_STYLE = Font.PLAIN; static final Font thinFont = new JLabel().getFont().deriveFont( BUTTON_FONT_STYLE, BUTTON_FONT_SIZE); public ThinButton(String label) { this(label, null); } public ThinButton(Action action) { super(action); init(); } private void init() { setFont(thinFont); } public ThinButton(String label, Icon icon) { super(label, icon); init(); } }