Hi guys,
I wrote a simple BMI calc in NetBeans 15. (I used newjFrame form to design layout)
At the moment user can input values using either imperial or metric units (I have separate buttons for lbs and kg and for inches and cm).
I can choose witch units I want to use. So if I choose buttons "lbs" and "inch" I have to put imperial units.
If I choose "kg" and "cm" then metric (which is obvious).
But I want to modify program so it will automatically convert units from metric to imperial and vice versa.
Say I put weight in pounds and height in inches (buttons lbs and inch are selected) . What I want now is when I'll change buttons to kg and cm program should convert units from imperial to metric for me . Hope that makes sense
So after running program looks like that (See link bellow):
Main part of code ( I cut most of code generated by NetBeans so it will be easier to read)
Thank you all for any advice