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.
It may have to do with the fact that multiple inhieritence is not allowed. For example, you may be writing a new Swing component that extends JComponent and you also want to have access to those constants. So you would extend JComponent and implement SwingConstants. That way you'd have access to all the methods in JComponent as well as all the constants in SwingConstants.
For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089
Actually this is a topic that pure Object Oriented programmers LOVE to argue over . Some say that putting the constants in an interface is quick easy and intuitive. (ex: Michael Ernest in this post) Others say that Interfaces should ONLY be used to declare TYPEs and that using it for constants is a dirty way of doing what SHOULD be done through static variables, as is done in the Math class. (ex: see "Effective Java" - Josha Block, p 89 Item 17 "Use interfaces only to define types") Some Pros
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: javax.swing.SwingConstants why an interface?