I'm working on a small File Management program in Eclipse(Version:Kepler). Also am new to Java Programming.
I designed a JPanel in a JFrame, where there are two JScrollPanes each containing a JList. The two JLists are programmed to show a list of files in two separate folders(i.e. JList1 shows list of files in Folder A and JList2 shows list of files in Folder B). Also there is a button for selection.
I need to program the button in such a way that only one Item is selected i.e. if I select an Item in JList1 then only that Item gets selected, not any Item in JList2 and vice-versa.
Its something to do with focus methods but I don't know how. I've searched the web, but search-results show item selection in one JList (not two JLists in the same panel).
Sample Codes would be appreciated.