Removing the three dots “…” from a JButton?

后端 未结 5 1883
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 01:44

Hey, I am creating a calculator program, with some small buttons, I want one of the buttons to have \"Ans\" on them, but whenever I make the JButton smaller then 50, 50, it

5条回答
  •  醉梦人生
    2020-12-16 01:58

    Don't set the preferred size of the button. Use the preferred size of the button and let the layout manager layout the components. The preferred size ensures all the text will be displayed properly on different Look and Feels.

提交回复
热议问题