swing - Java Change Button Background Color - Stack
2015-8-7 · In particular, you can use setForeground () to change the color of a button's text, but the corresponding setBackground () doesn't read well on some platforms. Using a Border is one alternative; a colored panel, shown below, is another. You can also try calling setOpaque (true) on your button. Share.
Get Price