SHARE
TWEET

Untitled

a guest Jan 13th, 2013 18 Never
  1. private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {
  2.         System.out.println("linha: " + jTable1.getSelectedRow());        // TODO add your handling code here:
  3.  
  4.  
  5.         try {
  6.             int id = (int) jTable1.getValueAt(jTable1.getSelectedRow(), 0);
  7.             Customer cu = Client.getServer().retrieveCustomer(id, client);
  8.             customerCityTf.setText(cu.getCity());
  9.             customerNameTf.setText(cu.getName());
  10.             customerPhoneTf.setText(cu.getPhone());
  11.             customerStateTf.setText(cu.getState());
  12.         } catch (Exception ex) {
  13.             Logger.getLogger(ClientGUI.class
  14.                     .getName()).log(Level.SEVERE, null, ex);
  15.         }
  16.  
  17.     }
RAW Paste Data
Top