sohail2409 0 Newbie Poster
private void Search(java.awt.event.ActionEvent evt) {                        
int rows = ((DefaultTableModel)jTable1.getModel()).getRowCount();
        		int index1 = 0; 
               
int index2 = 0; 

try { 
                    
index1 = Integer.valueOf(jTextField1.getText()); 
                   
index2 = Integer.valueOf(jTextField1.getText()); 
               
} catch (NumberFormatException e) { 
                   
e.printStackTrace(); 
                
} 

 
              
if (index1 < 0 || index2 < 0 || 
                       
index1 >= jTable1.getRowCount() || 
                        
index2 >= jTable1.getRowCount()) { 
                   
JOptionPane.showMessageDialog(jTable1, "Selection out of range!");                     
                
} else { 
                    
jTable1.setRowSelectionInterval(index1, index2); 
               
} 
  

  
    }

--------------------------------------------------------------
Now what I want is
On selecting an item from jlist and entering a value in JtextField related to it ,row in jtable containing that data show be Highlighted on clicking the search button..……… And on clicking the next button cursor in jtable should move for related search

but this code only highlight row based on their row,column value.......
sir please help me out