Could someone tell me how to get the selected item of JList to a String? It is a single selection JList.
JList
String
If you want the value of the selected item to a string you should try
String a = jList1.getSelectedValue().toString();