Article View: borland.public.jbuilder.java.swing
Article #755Re: duplicating Properties Dialog box
From: Paul Furbacher [TeamB]
Date: Mon, 13 Dec 2004 22:14
Date: Mon, 13 Dec 2004 22:14
43 lines
2469 bytes
2469 bytes
Alan Shiers wrote:
> [...] a properties dialog box [...] I'm only displaying properties [...]
>
> So, I'm going to need a JScrollPane, but what would you recommend I use to
> get the two columned list that one typically sees in a properties dialog
> box? The two columned list generally shows the property name in the left
> column and either provides a textfield in the second column or a button that
> opens a more detailed dialog box for that particular property.
>
> Any suggestions?
Have you thought about using a JTable? The first
column isn't editable, so you'd use a JLabel as
the renderer, setting its fore/back colors appropriately.
For getting the appropriate editor in the second column,
you would probably override JTable.getCellEditor(row, col)
to return the appropriate editor component.
Also, the following Web site may provide some
insight:
http://johnchildress.com/tame/
See the JTable demos (the source code is available).
Not all the links work correctly, but you can manually
change them to get to where you want to go.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Technical Details
Message-ID:
<41be143b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41bdfeec$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,f02e9216364acd50 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 13 Dec 2004 17:14:19 -0500 From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com> Organization: Reverse Alchemy, Inc. User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: duplicating Properties Dialog box References: <41bdfeec$1@newsgroups.borland.com> In-Reply-To: <41bdfeec$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 216.83.98.131 Message-ID: <41be143b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102976059 216.83.98.131 (13 Dec 2004 14:14:19 -0800) Lines: 43 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail