How to set the button color of a JButton (not background color)

后端 未结 5 1128
情话喂你
情话喂你 2021-01-13 04:08

I have a JButton that I would like to change the background color of to white. When using the Metal Look And Feel, I achieve the desired effect with setB

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 04:44

    but I still think that (modified but by Darryl) is correct UIManager.get("Button.gradient"), because would be crossplatform

    EDIT: correct answer would be - Nimbus or some Custom L&F, why reinvent the wheel (by Rob)

提交回复
热议问题