JList gets updated but just allow users to select items once
I have a JList that is located in a JScrollPane. The application has a button for users to browse fileSystem and select a category to show its files and folders. First time user clicks on the button JList shows the list and enables user to select from the list but if user clicks on the browse button for the second time new items will be shown but he wont be able to select any item from the list anymore. public class Main { private JFrame frame; final JFileChooser fc = new JFileChooser(); private JScrollPane scrollPane; File directory; JList<File> list; private final Action action_1 = new