Make a JButton exactly the same size of its Text

Posted by Spi1988 on Stack Overflow See other posts from Stack Overflow or by Spi1988
Published on 2010-04-26T10:24:06Z Indexed on 2010/04/26 10:43 UTC
Read the original article Hit count: 195

Filed under:
|
|

Is it possible to make a JButton take exactly the size of its text? Since by default, a JButton will have a small amount of padding (both horizontal and vertical) around its text. I would like to remove that padding.

A picture to explain myself better

thx

© Stack Overflow or respective owner

Related posts about java

Related posts about jbutton