Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
swing component?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jan Burse, post: 5019303"] The javadoc says: "The clientProperty dictionary is not intended to support large scale extensions to JComponent nor should be it considered an alternative to subclassing when designing a new component." So an alternative route would be to subclass: class myTable extends JTable { myType myKey; } Advantage is a little bit more type safety. Since the new field has now a type. So the compiler can do his work when you assign values, and spot errors or do box/unboxing etc.. But subclassing might not always be possible, for example when foreign code is used, and some static factory method irrevocable creates the GUI component. So client data is then a valid resort. Bye [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
swing component?
Top