Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: swing component? Date: Sun, 22 Apr 2012 10:10:34 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: <24010092.561.1335104359317.JavaMail.geo-discussion-forums@pbckz3> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 22 Apr 2012 17:10:37 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="QNqT5u6Ryx/DB+LpnoCWdQ"; logging-data="7895"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+izVofDHcVh0skPWYlgxPaYq7/PWAEvDA=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 In-Reply-To: Cancel-Lock: sha1:Vg+e/qRpBN224P9gBdug5LMHBAU= Xref: csiph.com comp.lang.java.programmer:13800 On 4/22/2012 8:18 AM, Jan Burse wrote: >> myTable.putClientProperty("com.mycompany.mypackage.mykey", "value"); >> > "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." Thanks to you and Quoll for pointing that out, I wasn't aware of that method. However, sub-classing is the last thing I'd want to do for the Swing API. The docs do say "large scale extensions," so as long as the OP only wants to store a few properties, it should be fine. OTOH, I've never needed to use this facility, so I really do wonder what Peter means to do. There's probably better ways of accomplishing his goal.