I have a program in java with several Jpanels designed; with certain font and background color for each component on each of my panels. Is there any clean way to change font of jpanels and components on them? I mean I want to bind properties to my components; and as I changed the property; It's influence reflect on all of jpanels.
You can use JComponent#putClientProperty(Object key, Object value) and this method could be used for multiple properties in one JComponent
You might want to investigate the use of different Look and Feels. This will allow you to change pretty much any properties of your components, and you can even change the loof & feel dynamically at runtime.
Also see the answers to this question: How do I get the default font for Swing JTabbedPane labels?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With