Jlist and Arrays

How to show a Jlist with updated array

Page 1 of 1

1 Replies - 1171 Views - Last Post: 13 August 2009 - 08:24 PM Rate Topic: -----

#1 paperLocust  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 04-August 09

Jlist and Arrays

Post icon  Posted 13 August 2009 - 11:16 AM

String[] items = new String[25];
JList entries = new JList(items)

When the array is updated shouldn't the Jlist update and become visible?
Is This A Good Question/Topic? 0
  • +

Replies To: Jlist and Arrays

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8022
  • View blog
  • Posts: 31,148
  • Joined: 06-March 08

Re: Jlist and Arrays

Posted 13 August 2009 - 08:24 PM

View PostpaperLocust, on 13 Aug, 2009 - 10:16 AM, said:

String[] items = new String[25];
JList entries = new JList(items)

When the array is updated shouldn't the Jlist update and become visible?

they will be all visible with "null"... better to init all of them with "" at least they will show nothing "" better than null
but you will update an items yes it will be shown in the JList

This post has been edited by pbl: 13 August 2009 - 08:25 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1