Article View: borland.public.jbuilder.java.swing
Article #12001Re: More Help about Scrollbar Event please !
From: Karsten B�lge
Date: Fri, 05 Mar 1999 00:00
Date: Fri, 05 Mar 1999 00:00
34 lines
1541 bytes
1541 bytes
Anne JANSSENS wrote in message <79u9ng$gdi4@forums.borland.com>...
>I've already tried to use the changeEventListener but it doesn't help me,
>because the changeEvent
>give only the information about the source of the event, the
>boundedRangeModel !
>In fact, the BoundedRangeModel let us now about the min, the max, the
value,
>the extent and the value of isAdjustmentEvent !
>
>I've already tried also to add a keyListener to the scrollbar to navigate
>with the arrow key, I didn't manage to achieve
>a keyListener !
>
>Does anyone have an idea ???
>
>Thack, :)Anne
>
>
>
I've solved the problem by adding a keylistener to the frame like the
following
this.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == java.awt.event.KeyEvent.VK_PAGE_UP)
{System.out.print("PageUP\n");};
if (e.getKeyCode() ==java.awt.event.KeyEvent.VK_PAGE_DOWN)
{System.out.print("PageDown\n");};
}
});
Karsten bolge.
Technical Details
Message-ID:
<7bolm8$6ff10@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<79s56v$bbn5@forums.borland.com> <79u9ng$gdi4@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,e01f6a057e7eb28 X-Google-Attributes: gid111d45,public From: "Karsten B�lge" <KUB@i-data.com> Subject: Re: More Help about Scrollbar Event please ! Date: 1999/03/05 Message-ID: <7bolm8$6ff10@forums.borland.com> X-Deja-AN: 451557894 References: <79s56v$bbn5@forums.borland.com> <79u9ng$gdi4@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: i-data international a-s Newsgroups: borland.public.jbuilder.java.swing