🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JList with scrollbar

#13268
From: Martin Anders
Date: Thu, 27 Aug 1998 00:00
25 lines
1389 bytes
Hi Alex,

Vladimir gave me the right hint, after you added a new element to a list you have to
call the revalidate method:

myList.revalidate();

You don't even have to call a firexxxx function() the revalidate() method adds and
removes a scrollbar when needed, and shows new list entries. Thanx Vladimir.

Martin


Vladimir Olenin wrote:

> Hi, Alex,
>
> Actually, Martin gave u really good advice. Most of swing components do
> not update their contents automatically. So, try do the following:
> invalidate(), validate(), repaint(). But almost for sure u should call
> some of firexxx() functions to let JList know it'd be repainted. This
> works with JTable.
>
>                                    Vladimir
>
Technical Details
Message-ID: <35E57705.BFAD6B6C@ddsynergy.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35E2A7B4.B5EC3479@cimag.de> <35E2F53B.2269C0AA@csi.com> <35E3D07E.FA559753@cimag.de> <35E3EB20.E51998A5@ddsynergy.de> <35E4906C.71069691@hempseed.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,b5ee876fbd119f83
X-Google-Attributes: gid111d45,public
From: Martin Anders <m_anders@ddsynergy.de>
Subject: Re: JList with scrollbar
Date: 1998/08/27
Message-ID: <35E57705.BFAD6B6C@ddsynergy.de>
X-Deja-AN: 385301556
Content-Transfer-Encoding: 7bit
References: <35E2A7B4.B5EC3479@cimag.de> <35E2F53B.2269C0AA@csi.com> <35E3D07E.FA559753@cimag.de> <35E3EB20.E51998A5@ddsynergy.de> <35E4906C.71069691@hempseed.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing