Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to add elements to Jlist

DefaultListModel<String> model = new DefaultListModel<>();
JList<String> list = new JList<>( model );

for ( int i = 0; i < customers.length; i++ ){
  model.addElement( customers[i].getName() );
}
 
PREVIOUS NEXT
Tagged: #add #elements #Jlist
ADD COMMENT
Topic
Name
1+6 =