• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JTable refresh problems

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic