JList
i have a Jlist that shows customer numbers and when clicked it displays custmer information from a dat file in a seperate panel (name, address etc), i seem to be having a problem with this piece of code any thoughts
class DisplayCustomerInformationListenerimplements ListSelectionListener{
/**
* Displays the information of the selected customer.
*
* @param event the event object.
*/
publicvoid valueChanged(ListSelectionEvent event){
if (! customerList.getValueIsAdjusting()){
int number = (String)customerList.getSelectedValue();
Customer customer = CustomerDatabase.getCustomer(number);
cDetailsPanel.removeAll();
cDetailsPanel.setVisible(false);
cDetailsPanel.add(customer.getPanel());// update the
cDetailsPanel.setVisible(true);// panel
statusTextArea.setText("Customer " + number
+" has been displayed");
}
}
}
int number = (String)customerList.getSelectedValue(); incompatible types

