I'm trying to change the contents of a JList variable. From what I
remember, I used removeAll() and added a new list within a function.
The following code may contain some errors with regards to exact
function calls.
String[] data = {"a","b","c","d","e","f","g"};
JList list = new JList(data);
changelist(); //only clears list but does not reinitialize variable
void changelist()
{
list.removeAll();
String[] newdata = {"a","b","c","d","e","f","g"};
list = new JList(newdata);
}
Does anybody know what's wrong with this code or if there are
alternatives for creating a URL Address Bar similar in most Web
Browsers?