This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Could you tell me what could be a nice way to set styles for Swing components ? I have a set of personal component (like MyButton inheriting JButton), and I'd like to set custom styles for each of them. The font would be the same for all.
I now have a class with a static method called setStyle(Component c), but it's full of if/else. Very ugly. Is there any cleaner way ?