This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 13th, 2013  |  syntax: Java  |  size: 0.70 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }
clone this paste RAW Paste Data