Hi,
I have a problem that I hope someone have some kind of tip of how to solve.
I have to JList's where one is consisting of a list of items and the other is empty (at fisrt). I also have two buttons which is used to move items between the lists.
I have solved how to copy an item (or more)...
I solved the problem! :-)
In the frame-class I did like this:
public class Main_Frame extends JFrame implements ListSelectionListener
{
JTable table;
...
ListSelectionModel lsm = table.getSelectionModel();
...
//Somewhere in the main code/constructor
table.setSelectionModel(lsm);
...
Hi!
I didn't find any help in the examples that comes with the JDK. :(
I wondered if it's possible to do it like this:
public class Table extends JTable implements ItemSelectable
{
...
}
//Salo
Which event should be appropriate when selecting a row in a Table. More precisely I want to display the info about the row in textfields when clicking on a row. Anyone got a clue?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.