• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable refresh problems

 
Tys Seyffert
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JTable that looks like it is refreshing every tim that i clink on it.

rowSM.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent e) {
//Ignore extra messages.
if (e.getValueIsAdjusting()){
return;
}
ListSelectionModel lsm = (ListSelectionModel)e.getSource();
if (lsm.isSelectionEmpty()) {
//no rows are selected
} else {
//selectedRow is selected
int selectedRow = lsm.getMinSelectionIndex();
if (GridDisplay.bCabOrUser){
GridDisplay.UserName = (String)tabMain.getValueAt(selectedRow, 0);
GridDisplay.sLoggedOut = (String)tabMain.getValueAt(selectedRow, 2);
}
else if ( ! GridDisplay.bCabOrUser){
GridDisplay.IndexName = (String)tabMain.getValueAt(selectedRow, 0);
GridDisplay.IndexType = (String)tabMain.getValueAt(selectedRow, 1);
Dependancy(GridDisplay.IndexType);
}
}
}
});

that is what i am doing with the listselection listener.
does anyone have an idea as to what i must do?
 
Tys Seyffert
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had a look now and it seems that sometimes only some columns filcker. by refreshing i meant that it flickers if you select anything in the table. i just dragged the window over it and it flickered as well.
Thanks again
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!