I have a JList that is defined as

private final JList _list = new JList(getList());

where getList() returns a String[] array.

I can change the String[] array elsewhere in the GUI so how can I have the JList refresh with the new options everytime I make a change? Is there some sort of


function that I could call?

I also have the same problem with a JTextArea defined as

private final JTextArea _textArea = new JTextArea(getMessage());

where getMessage() returns a string. How can I have them refresh?