I used a DefaultListModel to populate a JList.
Example: dlm.addElement(s); where s=String
When I retrieve a value from the JList using the index of dlm, it works great
When I output text -- "JList points to : " + lm.elementAt(idx) -- this also works great
When I attempt -- s = lm.elementAt(idx); javac flags me with:
incompatible types
found : java.lang.Object
required: java.lang.String
is there a handy method for getting my String back? A few times in the past I have gotten into similar type issues where I pick up some output and go to its type, at which class there is a method that sounds like it may get closer, but it only outputs to class x ... and so on, and never do get what I needed in the first place. Hoping I missed something simple.
TIA