protected void enableButtons(){
  m_M_Product_ID=-1;
  m_ProductName=null;
  m_Price=null;
  int row=m_table.getSelectedRow();
  boolean enabled=row != -1;
  if (enabled) {
    Integer ID=m_table.getSelectedRowKey();
    if (ID != null) {
      m_M_Product_ID=ID.intValue();
      m_ProductName=(String)m_table.getValueAt(row,2);
      m_Price=(BigDecimal)m_table.getValueAt(row,7);
    }
  }
  f_ok.setEnabled(enabled);
  log.fine("M_Product_ID=" + m_M_Product_ID + " - "+ m_ProductName+ " - "+ m_Price);
}

protected void enableButtons ( ) { m_M_Product_ID = - 1 ; m_ProductName = null ; m_Price = null ; int row = m_table . getSelectedRow ( ) ; boolean enabled = row != - 1 ; if ( enabled ) { Integer ID = m_table . getSelectedRowKey ( ) ; if ( ID != null ) { m_M_Product_ID = ID . intValue ( ) ; m_ProductName = ( String ) m_table . getValueAt ( row , 2 ) ; m_Price = ( BigDecimal ) m_table . getValueAt ( row , 7 ) ; } } f_ok . setEnabled ( enabled ) ; log . fine ( "M_Product_ID=" + m_M_Product_ID + " - " + m_ProductName + " - " + m_Price ) ; }
enable / set buttons and set id
