Reputation: 106401
I'm writing a game using Swing and want to achieve a distinctive "steampunk" inspired look for the GUI. This will require some animated components, chunky metallic borders etc.
I know that I can get nice effects by overriding paintComponent and doing all of my rendering for custom lightweight components in that method.
Is this the way to go, or should I be looking at developing a whole new pluggable Look and Feel?
What are the pros/cons of each?
Upvotes: 3
Views: 2082
Reputation: 11662
Creating a new L&F is a longer road, but keeps your code simple. (If you only need a few changes it's not worth the effort.) For example, the animations can be coded in the L&F part, so you don't need to worry about it in your components. I would suggest to edit a L&F that is close to what you need.
Upvotes: 3