How to set background color of a button in Java GUI?

后端 未结 7 1083
名媛妹妹
名媛妹妹 2020-12-06 00:30

Below is the code which creates 9 buttons in gridlayout form on a specific pannel3. What i want is to make the background of each button black with grey text over it. Can a

7条回答
  •  春和景丽
    2020-12-06 01:05

    You may or may not have to use setOpaque method to ensure that the colors show up by passing true to the method.

提交回复
热议问题