🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: HELP!!! Nobody answer me ( JList Pb)

#9670
From: Paul Furbacher
Date: Sun, 13 Feb 2000 00:00
24 lines
1332 bytes
Gemplus Software wrote:

> I have a JList in a JScrollPane and I want to detect a click in an
> automatic JScrollPane's ScrollBar. How do I do that kind of thing ???

I'm not sure I understand what you mean by "automatic"
scrollbar -- perhaps a scrollbar policy of "always"?
Whatever, if you wish to detect a click on one of a 
scrollpane's scollbars, you have to add the appropriate
type of listener to that scrollbar.  

JScrollPane gives you easy access to the scrollbars:

  // given a JScrollPane named "scroller"

  JScrollBar sbVert = scroller.getVerticalScrollBar();
  sbVert.addAdjustmentListener(new AdjustmentListener() {
    public void adjustmentValueChanged(...) {
      ...
    }
  });


Paul Furbacher (TeamB)
Technical Details
Message-ID: <38A763DA.E7ED4DB5@home.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38A28361.E5CC3659@gemplus.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a426a252b7283fc3
X-Google-Attributes: gid111d45,public
From: Paul Furbacher <pnf@home.com>
Subject: Re: HELP!!! Nobody answer me ( JList Pb)
Date: 2000/02/13
Message-ID: <38A763DA.E7ED4DB5@home.com>
X-Deja-AN: 585560371
Content-Transfer-Encoding: 7bit
References: <38A28361.E5CC3659@gemplus.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: pnf@home.com
Newsgroups: borland.public.jbuilder.java.swing