Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JList Problem

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
How can I convert customerList.getSelectedValue() to a string which I have pass to method as an argument.

 
Hi,
From what i get, u have a JList with some values in it and u want to send the selected item from the list to some method. If ur q is this, then the solution is casting.
Ex.
String selValue=(String)customerList.getSelectedValue();
method(selValue);

Hope this helps,
Reddy316
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top