Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
swdev:java:component:jlist [2017/09/29 16:31] smayr created |
swdev:java:component:jlist [2017/09/29 16:33] (current) smayr |
||
---|---|---|---|
Line 1: | Line 1: | ||
= JList = | = JList = | ||
- | To programmatically populate the list models: | + | To programmatically populate the list models |
<code java> | <code java> | ||
+ | import javax.swing.DefaultListModel; | ||
+ | import javax.swing.JList; | ||
+ | //... | ||
+ | |||
private void btnTestActionPerformed(java.awt.event.ActionEvent evt) { | private void btnTestActionPerformed(java.awt.event.ActionEvent evt) { | ||
// TODO add your handling code here: | // TODO add your handling code here: | ||
Line 15: | Line 19: | ||
listModel.addElement(" | listModel.addElement(" | ||
- | | + | |
} | } | ||
</ | </ |