I want to get the name of the selected item in that JList to a JOptionPane.showMessageDialog();
I tried like this ...
int i = userList.getSelectedIndex(); JOPitonPane.showMessageDialog(null,"Username: "+ (userList.getModel().getElementAt(i)));
but this is not working.
Can anyone help me....

New Topic/Question
Reply




MultiQuote





|