Question: Add the logic in order to work the form. Shoud implement exception handling import javax.swing. * ; public class BMICalculator { public static void main
Add the logic in order to work the form.
Shoud implement exception handling
import javax.swing.;
public class BMICalculator
public static void mainString args
JFrame frame new JFrameBMI Calculator";
frame.setSize;
frame.setDefaultCloseOperationJFrameEXITONCLOSE;
JPanel panel new JPanel;
frame.addpanel;
placeComponentspanel;
frame.setVisibletrue;
private static void placeComponentsJPanel panel
panel.setLayoutnull;
JLabel userLabel new JLabelBMI;
userLabel.setBounds;
panel.adduserLabel;
JLabel weightLabel new JLabelHow many pounds you weight?";
weightLabel.setBounds;
panel.addweightLabel;
JLabel heightLabel new JLabelWhat is your height in inches?";
heightLabel.setBounds;
panel.addheightLabel;
JLabel bmiLabel new JLabelYour BMI is;
bmiLabel.setBounds;
panel.addbmiLabel;
JLabel categoryLabel new JLabelObese;
categoryLabel.setBounds;
panel.addcategoryLabel;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
