The Artima Developer Community
Sponsored Link

Java Answers Forum
JList problem HELP!

6 replies on 1 page. Most recent reply: Oct 20, 2003 7:26 PM by zenykx

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 6 replies on 1 page
Delie

Posts: 12
Nickname: tuti
Registered: Oct, 2003

JList problem HELP! Posted: Oct 16, 2003 9:25 AM
Reply to this message Reply
Advertisement
I created a jlist, in the design view I see the data I entered. But When I run it, I don't see them in hte list, I see the list but i don't see the data.If you can help me, please...


sindu

Posts: 15
Nickname: sindu
Registered: Sep, 2003

Re: JList problem HELP! Posted: Oct 16, 2003 10:52 PM
Reply to this message Reply
post ur code otherwise its difficult to find

Delie

Posts: 12
Nickname: tuti
Registered: Oct, 2003

Re: JList problem HELP! Posted: Oct 17, 2003 6:48 AM
Reply to this message Reply
This is just a part of the code:

//Data for the list of hours that can be selected
String[] data = {"08:00 - 09:00", "09:00 - 10:00", "10:00 - 11:00", "11:00 - 12:00",
"12:00 - 13:00", "13:00 - 14:00", "14:00 - 15:00", "15:00 - 16:00",
"16:00 - 17:00"};
JList hoursList = new JList(data);
hoursList.setVisibleRowCount(8);

sindu

Posts: 15
Nickname: sindu
Registered: Sep, 2003

Re: JList problem HELP! Posted: Oct 18, 2003 11:07 AM
Reply to this message Reply
I am not sure.But I think it may work without setVisibleRowCount() and by the way the default visible row count in JList is 8 and so why do u need this setVisibleRowCount(8)?

zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: JList problem HELP! Posted: Oct 19, 2003 2:09 PM
Reply to this message Reply
try to put your JList inside a JScrollPane. I think this will solve your problem.
Pls.let me know.

katta kishore

Posts: 2
Nickname: kake
Registered: Oct, 2003

Re: JList problem HELP! Posted: Oct 20, 2003 5:41 AM
Reply to this message Reply
> try to put your JList inside a JScrollPane. I think this
> will solve your problem.
> Pls.let me know.

I really wonder y ur coding isnt working...there is no necessity to add jlist to jscrollpane....

zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: JList problem HELP! Posted: Oct 20, 2003 7:26 PM
Reply to this message Reply
> I really wonder y ur coding isnt working...there is no
> necessity to add jlist to jscrollpane....

I really cannot figure out what solution do you propose? Is it the 3 points in the end????

Flat View: This topic has 6 replies on 1 page
Topic: Problem with selection color JSlider Previous Topic   Next Topic Topic: Font property in JTable

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use