• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to pass the model to JList in netbeans5?

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i just moved to nb5 and matisse gui and im trying my first steps with it.

i created the JFrame, draged the JList on it and i wrote a separat class which gets some data from DB. All i want ist to show that Data in JList. In a property pane,when Jlist is selected, there is "model" option but it only offers to add the items manualy ?

in my separete class i have something like :
while (rs.next()) {
someVector.add(rs.getInt("id"));
}

and i have the geterMethod like:
public Vector getSomeVector(){
return someVector;
}
so how to say the gui that i want to call that method so that i have something like:
JList jlist = new JList( someVector);

TIA
 
reply
    Bookmark Topic Watch Topic
  • New Topic