I am using Jtable and want to check any empty cell on action event of JButton and to set focus on that particular empty cell. if any body encounter with same task please help me out. Thanks in advance !!!
Cp Baherwani
Ranch Hand
Joined: May 13, 2005
Posts: 41
posted
0
Loop thru the rows and columns for table.getModel().getRowCount() and table.getModel().getColumnCount() number of times.
Check the value of each cell with table.getModel().getValueAt(row,col)
When found table.setRowSelectionInterval(row,row); table.setColumnSelectionInterval(col,col); [ May 16, 2006: Message edited by: Chandra Prakash Baherwani ]
prashant gour
Ranch Hand
Joined: Feb 07, 2006
Posts: 45
posted
0
ThnX Chandra Now i am able to check the value at any cell but still i am not able to set focus on that cell. i want to set mouce cursor on that cell .
one more problem when i make any change in cell and focus is still in that cell. value does not set to model. but as i lost the focus from cell, value has been set to model.
so can i set value to model while insert update of cell.