🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #625

Re: JList problems

#625
From: John McGrath [TeamB]
Date: Sat, 26 Mar 2005 22:47
31 lines
1849 bytes
On 3/25/2005 at 8:53:30 PM, Alan Shiers wrote:

> In my opinion, the clear() method of the DefaultListModel should fire
> whatever methods it takes to refresh the JList just as the
> setListData(...) method of the JList does.

   public void clear() {
      int index1 = delegate.size()-1;
      delegate.removeAllElements();
      if (index1 >= 0) {
         fireIntervalRemoved(this, 0, index1);
      }
   }

As you can see, it does fire the appropriate event.

> If anyone knows of anything I've overlooked in so far as my first
> approach, I'd like to hear from you.

It is hard to tell what is going wrong from just a description of what you
think the code is doing.  If you post a runnable example of the problem, I
will be glad to take a look at it.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <xn0e07u8b1b2n4s001@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4244c27d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,db236ef79ca42222
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Subject: Re: JList problems
Newsgroups: borland.public.jbuilder.java.swing
References: <4244c27d$1@newsgroups.borland.com>
User-Agent: XanaNews/1.17.3.1
Message-ID: <xn0e07u8b1b2n4s001@newsgroups.borland.com>
X-Ref: newsgroups.borland.com ~XNS:0000031F
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 141.158.33.210
Date: 26 Mar 2005 14:47:10 -0800
X-Trace: newsgroups.borland.com 1111877230 141.158.33.210 (26 Mar 2005 14:47:10 -0800)
Lines: 31
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail