Change JButton gradient color, but only for one button, not all
问题 I want to change JButton gradient color, i found this, http://java2everyone.blogspot.com/2009/01/set-jbutton-gradient-color.html, but i want to change gradient for only one button, not all button 回答1: You can override the paintComponent method of the JButton instance and paint its Graphics object with one of the following classes that implement the Paint interface: GradientPaint. LinearGradientPaint MultipleGradientPaint RadialGradientPaint import java.awt.Color; import java.awt.Dimension;