so basically I need to have 2 windows, and in the first I have (initially empty) JList, and in the second I have JTable. After double-clicking on an element from JTableit, you need to add the corresponding element to JList(I’m not sure yet that it will be, perhaps, the String value of the first cell in the row in which I double-clicked). In addition, if I ever had elements in JList, then their corresponding values in the table should be highlighted in a different color, so the line I double-clicked in should be set to red. Also, if I delete an item from JListat some point, it should change the color of the corresponding row in the table back to black.
I'm just wondering if anyone can give me advice on the best approach to developing such an application, and in particular (if no one can offer anything else), would it be more efficient to use observers rather than some methods of obtaining? I have not tried working with observers yet, but if they are the best choice in this case, I will be happy to try to learn.
thank
source
share