Article View: borland.public.jbuilder.java.swing
Article #107Re: Adding a string to a JList
From: John Meyer
Date: Wed, 01 Feb 2006 17:41
Date: Wed, 01 Feb 2006 17:41
41 lines
2494 bytes
2494 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Furbacher [TeamB] wrote: > Paul Furbacher [TeamB] wrote: > >> [...] DefaultListModel [...] > > To add to what I just wrote, you should be using > the "drill down" feature of JBuilder to your > advantage. Put the cursor anywhere in the word > "JList" in your source file, hit Control-return, > and you are looking at the source for JList. > From there, use the Structure Pane to flip to > the "getModel()" method. Note that it returns > an interface, ListModel. Search the JList.java > file in your editor for "listmodel" and read the > discussions. Or flip to the "Doc" tab, and read > them there in more nicely rendered HTML. See > the links to the various tutorials and articles. > One in particular is well-suited to answering > your question. > > Finally, drill down into DefaultListModel, and take > that lesson to the bank by using the drill down > technique to become more familiar with any API > which comes with source code. Thanks. I went through the whole help file, and some of the Java, and found the answer, namely, adding the objects through the DefaultListModel and not the JList directly. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD4PLdj60GAoLuoDkRAnTKAKCROcpcZwWEIS4TrKRQKcuGmi/6hwCfSdVp t7nqeg6n/JIVDEL9t8VtqXk= =SmKa -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<43e0f31f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43ceddfe@newsgroups.borland.com> <43cf12e0$1@newsgroups.borland.com> <43cf14bf@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,cce83396da78078c X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 01 Feb 2006 10:41:50 -0700 From: John Meyer <john.l.meyer@gmail.com> User-Agent: Thunderbird 1.5 (X11/20051227) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Adding a string to a JList References: <43ceddfe@newsgroups.borland.com> <43cf12e0$1@newsgroups.borland.com> <43cf14bf@newsgroups.borland.com> In-Reply-To: <43cf14bf@newsgroups.borland.com> X-Enigmail-Version: 0.93.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.165.196.37 Message-ID: <43e0f31f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1138815775 67.165.196.37 (1 Feb 2006 09:42:55 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail