Article View: borland.public.jbuilder.java.language
Article #15691Re: JScrollPane Help
From: Linda Licari
Date: Tue, 11 May 1999 00:00
Date: Tue, 11 May 1999 00:00
82 lines
3730 bytes
3730 bytes
I believe the problem you are experiencing is due to the fact that the viewport (when you first instatiate the scrollpane) is smaller than the scroll pane thus no scroll bars appear. Your model needs to listen for changes by using ListDataListener. Hope this helps, linda In article <vSWZ2.8833$u34.3780@news.rdc1.md.home.com>, "Andrew G. Lader" <lader@~nospam~home.com> wrote: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0044_01BE9B96.685911E0 > Content-Type: text/plain; > charset="Windows-1252" > Content-Transfer-Encoding: quoted-printable > > I have a JList within a JScrollPane. When I fill the list while still = > in the app's constructor, I get a listbox with the appropriate = > scrollbars. Perfect. > > But when I do not fill the list box in the constructor, and fill it = > instead when the user selects a particular menu command, the scrollbars = > do not appear. The list can be dragged-scrolled, but it looks awful! = > Why does it exhibit this behavior? What is the magic method I need to = > call to let the scroll pane know that I have list items now? > > Any help will be greatly appreciated (I feel like I have spent too much = > time on this already). Thanks in advance... > > ------=_NextPart_000_0044_01BE9B96.685911E0 > Content-Type: text/html; > charset="Windows-1252" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META content=3D"text/html; charset=3Dwindows-1252" = > http-equiv=3DContent-Type> > <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=3D#ffffff> > <DIV>I have a JList within a JScrollPane. When I fill the list = > while still=20 > in the app's constructor, I get a listbox with the appropriate = > scrollbars. =20 > Perfect.</DIV> > <DIV> </DIV> > <DIV><FONT face=3DTahoma>But when I do not fill the list box in the = > constructor,=20 > and fill it instead when the user selects a particular menu command, the = > > scrollbars do not appear. The list can be dragged-scrolled, but it = > looks=20 > awful! Why does it exhibit this behavior? What is the magic = > method I=20 > need to call to let the scroll pane know that I have list items=20 > now?</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3DTahoma>Any help will be greatly appreciated (I feel = > like I have=20 > spent too much time on this already). Thanks in=20 > advance...</FONT></DIV></BODY></HTML> > > ------=_NextPart_000_0044_01BE9B96.685911E0-- > > --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---
Technical Details
Message-ID:
<7h9j6j$61i$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<vSWZ2.8833$u34.3780@news.rdc1.md.home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10fd6d,59b2be28f29bfe66 X-Google-Attributes: gid10fd6d,public X-Google-Thread: fa010,59b2be28f29bfe66 X-Google-Attributes: gidfa010,public X-Google-Thread: 10a146,59b2be28f29bfe66 X-Google-Attributes: gid10a146,public X-Google-Thread: f74b3,59b2be28f29bfe66 X-Google-Attributes: gidf74b3,public From: Linda Licari <llicari@my-dejanews.com> Subject: Re: JScrollPane Help Date: 1999/05/11 Message-ID: <7h9j6j$61i$1@nnrp1.deja.com> X-Deja-AN: 476609360 References: <vSWZ2.8833$u34.3780@news.rdc1.md.home.com> X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 192.83.249.51 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Tue May 11 15:43:16 1999 GMT Newsgroups: borland.public.jbuilder.java.language,comp.lang.java.gui,comp.lang.java.programmer,symantec.support.devtools.pc.visual-cafe.java X-Http-User-Agent: Mozilla/4.51 [en] (WinNT; I)