The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 How to Write a Custom Swing Component
Subject:  Excellent Article!
Date:  2007-02-23 12:43:25
From:  kirillcool
Response to: Excellent Article!


Mikael,

I have thought about this for quite some time. The main thing is that you have a certain mismatch - N ranges and N+1 icons / strings. So just wrapping an icon and a string with a range is not a good option - you'll need to specify the last control point. And why should it be any different from any other control point> And why the range definition contains information only on the starting control point?

So, as much as i understand the need for tooling support, in this particular component i felt it's better to follow the API from JDK (LinearGradientPaint) than tailoring the solution (intuitive API that models the domain) to the tooling limitations (no-arg constructor and getter / setter pairs).

 Feed java.net RSS Feeds