If you use Look and Feel, which honors the user interface constants in javax.swing.UIManager , you can simply set them. There are values, for example. background panels. If not, or if you cannot control this look, you can write your own user interface delegate that draws a specific component (for example, javax.swing.plaf.ButtonUI for JButtons). If even this is not enough, you can write your own Look And Feel. If you simply extend Metal LnF, it is not so difficult, you should write your own user interface delegates and set the properties as described above, but centralized.
source share