/* * frmMain.java * * Created on January 17, 2008, 4:44 PM */ /** * * @author jpurdum */ public class frmMain extends javax.swing.JFrame { /** Creates new form frmMain */ public frmMain() { initComponents(); } private void btnCalcActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: // femail = 3.5Height - 108; // male = 4.0Height - 128; int height; int start; int end; double female; double male; String buff; try { start = Integer.parseInt(txtLowLimit.getText()); end = Integer.parseInt(txtUpperLimit.getText()); female = 3.5 * start - 108; male = 4.0 * start - 128; height = start; do { //for(height = start; height < end; height++) //{ female += 3.5; male += 4.0; buff = Integer.toString(height) + " " + Double.toString(female) + " " + Double.toString(male); System.out.println(buff); height++; } while (height <= end); } catch (Exception ex) { ex.getMessage(); System.exit(0); } } private void btnEcitActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: System.exit(0); } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new frmMain().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JButton btnCalc; private javax.swing.JButton btnEcit; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JTextField txtLowLimit; private javax.swing.JTextField txtUpperLimit; // End of variables declaration }