nevermind. I figured it out, my space provided wasn't big enough.
thank you guys so much for helping me with this!!!
here is the completed code if anyone wants it for anything
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class AccurateBMI extends JComponent implements ActionListener {
String t;
String T;
JFrame frame = new JFrame("A More Accurate BMI Calculator");
Container content = frame.getContentPane();
JLabel male = new JLabel();
JTextField trueFalse = new JTextField();
JLabel weight = new JLabel();
JTextField heavy = new JTextField();
JLabel height = new JLabel();
JTextField inches = new JTextField();
JLabel wrist = new JLabel();
JTextField circum = new JTextField();
JButton calcBMI = new JButton();
JLabel totalBMI = new JLabel();
public static void main(String[] args) {
AccurateBMI application = new AccurateBMI();
}
public void actionPerformed(ActionEvent event) {
String gender = trueFalse.getText();
double pounds = Double.parseDouble(heavy.getText());
double height = Double.parseDouble(inches.getText());
double wrist = Double.parseDouble(circum.getText());
double num1 = height*height;
double bmi = (pounds/num1)*703;
//totalBMI.setText("Your more accurate BMI is: " + bmiTot);
//totalBMI.setText("Your more accurate BMI is: " + );
double bmiTot = 0.0;
if (gender.equals(T) | gender.equals(t)){
if (height >= 65 && wrist >= 7.5){
bmiTot = bmi*.9;
}else {
bmiTot = bmi;
}
}else {
if (height >= 65 && wrist >= 6.5 || height > 62 && height < 65 && wrist >= 6.25 || height <= 62 && wrist > 5.75){
bmiTot = bmi*.9;
}else {
bmiTot = bmi;
}
};
totalBMI.setText("Your more accurate BMI is: " + bmiTot);
}
public AccurateBMI() {
content.setBackground(Color.white);
content.setLayout(null);
content.setForeground(Color.yellow);
content.setFont(new Font("Arial", Font.ITALIC, 14));
content.add(this);
male.setText("You are a male. T or F: ");
male.setLocation(5,5);
male.setSize(300,30);
content.add(male);
trueFalse.setText("");
trueFalse.setLocation(310,5);
trueFalse.setSize(50,30);
content.add(trueFalse);
trueFalse.addActionListener(this);
weight.setText("How much do you weigh in pounds?");
weight.setLocation(5,50);
weight.setSize(300,30);
content.add(weight);
heavy.setText("");
heavy.setLocation(310,50);
heavy.setSize(50,30);
content.add(heavy);
heavy.addActionListener(this);
height.setText("Please enter your height in inches: ");
height.setLocation(5,95);
height.setSize(300,30);
content.add(height);
inches.setText("");
inches.setLocation(310,95);
inches.setSize(50,30);
content.add(inches);
inches.addActionListener(this);
wrist.setText("How many inches around is your wrist? ie: 7.25 ");
wrist.setLocation(5,140);
wrist.setSize(300,30);
content.add(wrist);
circum.setText("");
circum.setLocation(310,140);
circum.setSize(50,30);
content.add(circum);
circum.addActionListener(this);
calcBMI.setText("Calculate");
calcBMI.setLocation(130,180);
calcBMI.setSize(100,30);
content.add(calcBMI);
calcBMI.addActionListener(this);
totalBMI.setText(" ");
totalBMI.setLocation(100,220);
totalBMI.setSize(200,30);
content.add(totalBMI);
frame.setLocation(0,0);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(385,300);
frame.setVisible(true);
}
}