So so the 100 s of other people posting here <| sep |> Or the white one is really popular . I found it more appealing . <| sep |> uskyrimlady gave you some very good advice already . Learn Layout managers . They make your life much easier . Seriously . There ' s even more using your current configuration without a layout managerUse methods to manage your components . You have the same code for each JLabel ageLabel new JLabelAge ageLabel . setBounds 5 , 44 , 30 , 30 mainPanel . addageLabelHere , a method would already be appropriate . If you want , the method can even return the JLabel . I ' m thinking about something along private JLabel createLabelJPanel panel , String caption , int left , int top , int width , int height JLabel tmp new JLabelcaption tmp . setBoundsleft , top , width , height panel . addtmp return tmp This way , the whole code to create your JLabel becomes ageLabel createLabelmainPanel , Age , 5 , 44 , 30 , 30 The same applies to all other components that you use repetitively . You need to remember that Swing components are in no way different to normal Java classes and objects . You can and should use everything that you do with other classes and objects , such as methods , loops , data structures , etc . Your naming is generally good , but names like getTheAge are uncommon . Normally , the article is omitted , so the name would become getAge just as clear , but shorter . You use magic numbers in your getBMR method . This is a general nogo in programming . What do the numbers 66 , 6 . 2 , 12 . 7 , 6 . 76 , 655 . 1 , 4 . 35 , 4 . 7 , 4 . 7 mean ? Here , you could make good use of Java ' s great Enum type . Create an enum that has two values male and female and that has all the factors stored . See the lower example planets in the tutorial that I ' ve linked . Give each number a meaningful name . Plus , the name is actually wrong . It should be calculateBMR or calcBMR to indicate that BMR is not a field . In the getBmrMultiplier you do the same again magic numbers again , either Enums , or Constants static final variables that you define at class level . private static final double MULTDEFAULT 1 . 0 private static final double MULTLITTLEEXERCISE 1 . 2 private static final double MULTLIGHTEXERCISE 1 . 375 private static final double MULTMODERATEEXERCISE 1 . 55 private static final double MULTHARDEXERCISE 1 . 725 private static final double MULTEXTREMEEXERCISE 1 . 9 This reads much better than numeric literals in the code and the meaning becomes instantly clear . The actual numeric value is not as important as the meaning or intent . In that method , your formatting is off . The return statement should be closer to the if it is difficult to read that method the way it is programmed . The return statements are too close to the else . Either remove the empty line completely preferred , or place the empty line after the return statements . In mouseClicked you also have magic numbers 500 and 1000 use constants for that offsets . A formatting tip The empty line after your method headers is misleading public double getTheAge return Double . parseDoubleageTextField . getText It makes the code actually more difficult to read than if it weren ' t there . public double getTheAge return Double . parseDoubleageTextField . getText Looks better because the semantic connection is not broken . What your code needs are 137868 . html comments . You should document each method especially the calculating ones . Inline comments are mostly unnecessary because the code is written fairly clear . Inline comments should only explain why something is done in a certain way and never how . Also , comments like check if works are never really okay . If you are not sure , add a TODO comment . Most IDEs recognize this comment and put it in a Task list . Then you see where you need extra work and to which methods you need to come back . Sorry for the lengthy comment , don ' t take it personal . It is meant with the best intent . Edit after a short break I found one more thing that irked meThe following method public boolean getgender check if works if femaleRadioButton . isSelected return false return true There are several things wrong in that method Naming getGender that does not reflect what the method actually does . Methods returning a boolean use is or has as prefix , not get . Then , Gender does not explain the meaning of the return value . isMale would be far clearer as method name . The body of the method as such . Constructs like if femaleRadioButton . isSelected return false return trueare really bad . . isSelected already returns a boolean , so there is no need for an additional if . The whole method can be shortened to public boolean isMale return ! femaleRadioButton . isSelected Clearer , more concise and conveys the intent better .