I am now using a JList with default selection mode MULTIPLE_SELECTION. This allow user to make multiple selection by holding the Ctrl key and clicking on the left mouse button. And it work fine.
My first Question is:
if I would like to let user to make multiple selection WITHOUT holding on Ctrl key, how should I code?
I am using a loop to append text into a JTexArea which is contain in a JScrollPane. I use the JTextArea.append(String str) to append the string. It also work fine but the user will only see the top portion of the JTextArea if they do not scroll it manually to the bottom.
My second question is:
How to scroll the JScrollPane automatically to the bottom of the JTextArea after each time append text to it?