[6220] in java-interest
Re: Scrolling List Class
daemon@ATHENA.MIT.EDU (Jeff Marin)
Mon Mar 25 20:49:21 1996
Date: Mon, 18 Mar 1996 23:15:15 -0500
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: Jeff Marin <jmarin@MARS.SUPERLINK.NET>
To: Multiple recipients of list JAVA-INTEREST
<JAVA-INTEREST@JAVASOFT.COM>
Alan Masters wrote:
>
> I would very much like to make a wide list of items.
>
> Unfortunately, List (JDK 1.0) has two constructors, neither of which specify
> width.
>
> I have tried re-sizing the object and using the GridBagLayout fill BOTH,
> but neither of them alter the width of list which appears to default to
> 18-20 chars.
>
> I am attempting to produce a summary list of bugs, then use the selection
> mechanism
>
> string = list.getSelectedItem ();
>
> to identify the selected item.
>
> TextArea would be apparently no use, as I am unable to make selections from
> there.
>
> Does anybody have any suggestions please ?
>
> Many thanks, Alan Masters.
If you derive from List and override preferredSize and minimumSize, you
should be able to resize your list correctly.
--
************************************************************************Jeff Marin jmarin@superlink.com
@Work Technologies http://www.worktechs.com
< "To err is human, to not learn JAVA mentally healthy but unavoidable!"
>
-----
This message has been forwarded via the JAVA-INTEREST
mailing list. In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).