I tried making it in my ListSelectionListener:
public void valueChanged (ListSelectionEvent e){
int r = lvwCalendar.getSelectedRow();
int c = lvwCalendar.getSelectedColumn();
if (r != -1 && c != -1){
if (lvwCalendar.getValueAt(r, c) != null && e.getValueIsAdjusting() == false){
//Selection OK
}
else if (e.getValueIsAdjusting() == false){
//Prevent selection
}
}
}
I really can't figure out how to do it, any help please? Thanks.

Ask A New Question
Reply





MultiQuote




|