I have a JTable and a string in it. By default, the first row is selected and focus is in it. How can I deselect the first row and change the focus to another, that .addListener(new RowSetListener() will work in the first row .addListener(new RowSetListener() .
I'm already trying:
tableZaposlenciView1.setRowSelectionAllowed(true); //tableZaposlenciView1.getSelectionModel().clearSelection(); //tableZaposlenciView1.setColumnSelectionInterval(0,0); //tableZaposlenciView1.setRowSelectionInterval(false,false); tableZaposlenciView1.changeSelection(0,0,false,false); tableZaposlenciView1.requestFocus();
but it does not work.
source share