views:

927

answers:

1

How can I create a JButton in Swing with the icon above the text?

+6  A: 

just do this:


    button.setVerticalTextPosition(SwingConstants.BOTTOM);
    button.setHorizontalTextPosition(SwingConstants.CENTER);

joki