Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object[] javax.swing.JList.getSelectedValues()
- getSelectedValues
- @Deprecated
- public Object[] getSelectedValues()
- Deprecated. As of JDK 1.7, replaced by getSelectedValuesList()
- Returns an array of all the selected values, in increasing order based on their indices in the list.
- Returns:
- the selected values, or an empty array if nothing is selected
- See Also:
- isSelectedIndex(int), getModel(), addListSelectionListener(javax.swing.event.ListSelectionListener)
- private JList LeftList = new JList();
- private JList RightList = new JList();
- private JButton Move = new JButton("Move -->");
- private static String[] Items = {"Item 1", "Item 2","Item 3","Item 4","Item 5"};
- rightList.setListData(leftList.getSelectedValuesList().toArray());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement