From 39d29d26a55696d7e7d9e31fbc6facf68bcd8014 Mon Sep 17 00:00:00 2001 From: Moulikaaaa Date: Sun, 15 May 2022 22:45:03 +0530 Subject: [PATCH] Diet Plan Recommendation Project Uploaded --- Team 66 Diet Plan Recommendations/BMI.java | 35 +++ .../DietPlan.java | 22 ++ .../DietPlanClient.java | 283 ++++++++++++++++++ .../Dietplan_1.java | 67 +++++ .../LoginCred.java | 110 +++++++ .../Loginpage.java | 107 +++++++ .../Profile.java | 52 ++++ Team 66 Diet Plan Recommendations/Signup.java | 103 +++++++ .../Welcomepage.java | 103 +++++++ Team 66 Diet Plan Recommendations/diet.java | 32 ++ .../female_dp.java | 125 ++++++++ .../male_dp.java | 100 +++++++ .../temperory.java | 193 ++++++++++++ 13 files changed, 1332 insertions(+) create mode 100644 Team 66 Diet Plan Recommendations/BMI.java create mode 100644 Team 66 Diet Plan Recommendations/DietPlan.java create mode 100644 Team 66 Diet Plan Recommendations/DietPlanClient.java create mode 100644 Team 66 Diet Plan Recommendations/Dietplan_1.java create mode 100644 Team 66 Diet Plan Recommendations/LoginCred.java create mode 100644 Team 66 Diet Plan Recommendations/Loginpage.java create mode 100644 Team 66 Diet Plan Recommendations/Profile.java create mode 100644 Team 66 Diet Plan Recommendations/Signup.java create mode 100644 Team 66 Diet Plan Recommendations/Welcomepage.java create mode 100644 Team 66 Diet Plan Recommendations/diet.java create mode 100644 Team 66 Diet Plan Recommendations/female_dp.java create mode 100644 Team 66 Diet Plan Recommendations/male_dp.java create mode 100644 Team 66 Diet Plan Recommendations/temperory.java diff --git a/Team 66 Diet Plan Recommendations/BMI.java b/Team 66 Diet Plan Recommendations/BMI.java new file mode 100644 index 0000000..ec229e6 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/BMI.java @@ -0,0 +1,35 @@ +package client; + +import java.util.Date; +public class BMI { + private Date date; + private float weight; + private float height; + //gender + public BMI(Date date, float weight, float height) { + super(); + this.date = date; + this.weight = weight; + this.height = height; + } + public Date getDate() { + return date; + } + public void setDate(Date date) { + this.date = date; + } + public float getWeight() { + return weight; + } + public void setWeight(float weight) { + this.weight = weight; + } + public float getHeight() { + return height; + } + public void setHeight(float height) { + this.height = height; + } + + +} diff --git a/Team 66 Diet Plan Recommendations/DietPlan.java b/Team 66 Diet Plan Recommendations/DietPlan.java new file mode 100644 index 0000000..c40ccfe --- /dev/null +++ b/Team 66 Diet Plan Recommendations/DietPlan.java @@ -0,0 +1,22 @@ +package client; + +public class DietPlan { + private String age; + private String weight; + + public DietPlan(String age,String weight) { + this.age=age; + this.weight=weight; + } + + public String getAge() { + return age; + } + public String getWeight() { + return weight; + } + @Override + public String toString() { + return"age=" + age +"Weight:" +weight; + } +} diff --git a/Team 66 Diet Plan Recommendations/DietPlanClient.java b/Team 66 Diet Plan Recommendations/DietPlanClient.java new file mode 100644 index 0000000..220cb93 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/DietPlanClient.java @@ -0,0 +1,283 @@ +package client; +import java.util.*; +import java.util.Map.Entry; + +public class DietPlanClient{ + private static String final_plan; + + + public static void main(String[] args) { + + + Map map1 = new HashMap<>(); + DietPlan d1 = new DietPlan("18+","30-40"); + DietPlan d2 = new DietPlan("18+","40-50"); + DietPlan d3 = new DietPlan("18+","50-60"); + DietPlan d4 = new DietPlan("18+","60-70"); + DietPlan d5 = new DietPlan("18+","70-80"); + DietPlan d6 = new DietPlan("18+","80-above"); + DietPlan d7 = new DietPlan("30-40","30-40"); + DietPlan d8 = new DietPlan("30-40","40-50"); + DietPlan d9 = new DietPlan("30-40","50-60"); + DietPlan d10 = new DietPlan("30-40","60-70"); + DietPlan d11 = new DietPlan("30-40","70-80"); + DietPlan d12 = new DietPlan("30-40","80 Above"); + DietPlan d13 = new DietPlan("40-50","30-40"); + DietPlan d14 = new DietPlan("40-50","40-50"); + DietPlan d15 = new DietPlan("40-50","50-60"); + DietPlan d16 = new DietPlan("40-50","60-70"); + DietPlan d17 = new DietPlan("40-50","70-80"); + DietPlan d18 = new DietPlan("40-50","80 Above"); + DietPlan d19 = new DietPlan("50-60","30-40"); + DietPlan d20 = new DietPlan("50-60","40-50"); + DietPlan d21 = new DietPlan("50-60","50-60"); + DietPlan d22 = new DietPlan("50-60","60-70"); + DietPlan d23 = new DietPlan("50-60","70-80"); + DietPlan d24 = new DietPlan("50-60","80 Above"); + DietPlan d25 = new DietPlan("60-70","30-40"); + DietPlan d26 = new DietPlan("60-70","40-50"); + DietPlan d27 = new DietPlan("60-70","50-60"); + DietPlan d28 = new DietPlan("60-70","60-70"); + DietPlan d29 = new DietPlan("60-70","70-80"); + DietPlan d30 = new DietPlan("60-70","80 Above"); + DietPlan d31 = new DietPlan("70-above","30-40"); + DietPlan d32 = new DietPlan("70-above","40-50"); + DietPlan d33 = new DietPlan("70-above","50-60"); + DietPlan d34 = new DietPlan("70-above","60-70"); + DietPlan d35 = new DietPlan("70-above","70-80"); + DietPlan d36 = new DietPlan("70-above","80 Above"); + map1.put(d1, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits etc." + + "\n\n Lunch \t\t 1 bowl of steamed sprout with salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+chapati"); + map1.put(d2, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits etc." + + "\n\n Lunch \t\t 1 bowl of steamed sprout with salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+chapati"); + map1.put(d3, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits,oats etc." + + "\n\n Lunch \t\t 1 bowl of steamed sprout with salad,green leafy vegetables" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+chapati"); + map1.put(d4, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits,oats etc." + + "\n\n Lunch \t\t 1 bowl of steamed sprout with salad,green leafy vegetables" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream"); + map1.put(d5, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits,1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d6, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 1 bowl of pomegranet/melons/citrus fruits, 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d7, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d8, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d9, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d10, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d11, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& fruits + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream"); + map1.put(d12, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& fruits,oats etc." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d13, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 2 egg brown bread sandwich + green chutney + 1 cup milk + 3 cashews + 4 almonds + 2 walnuts." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 cup potato curry + 3 chapatti + 1/2 cup rice + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d14, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 2 egg brown bread sandwich + green chutney + 1 cup milk + 3 cashews + 4 almonds + 2 walnuts." + + "\n\n Lunch \t\t 1 cup arhar dal + 1 cup potato curry + 3 chapatti + 1/2 cup rice + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d15, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 2 egg brown bread sandwich + green chutney + 1 cup milk + 3 cashews + 4 almonds + 2 walnuts." + + "\n\n Lunch \t\t 1 cup arhar dal + 3 chapatti + 1/2 cup rice + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d16, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 2 egg brown bread sandwich + green chutney + 1 cup milk + 3 cashews + 4 almonds + 2 walnuts." + + "\n\n Lunch \t\t 1 cup arhar dal + 2 chapatti + 1/2 cup rice + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d17, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar)" + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d18, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar)" + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d19, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& 3 egg whites + 1 toasted brown bread + 1/2 cup low fat milk (no sugar) or fruits" + + "\n\n Lunch \t\t 1 cup arhar dal + 2 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables+ 1 chapati"); + map1.put(d20, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& Oats + 1/2 cup low fat milk (no sugar) or fruits" + + "\n\n Lunch \t\t 1 cup arhar dal + 2 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables + 1 chapati"); + map1.put(d21, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with honey" + + "& Oats + 1/2 cup low fat milk (no sugar) or fruits" + + "\n\n Lunch \t\t 1 cup arhar dal + 2 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables + 1 chapati"); + map1.put(d22, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + 1/2 cup low fat milk (no sugar)" + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables + 1 chapati"); + map1.put(d23, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + 1/2 cup low fat milk (no sugar)" + + "\n\n Lunch \t\t 1 cup arhar dal + 2 chapatti + 1/2 cup low fat curd + salad + sprouts" + + "\n\n Dinner\t\t 1 bowl of vegetable soup+stream and sauteed vegetables"); + map1.put(d24, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + 1/2 cup low fat milk (no sugar)" + + "\n\n Lunch \t\t 1 cup arhar dal + 1 chapatti + 1/2 cup low fat curd + salad + sprouts " + + "\n\n Dinner\t\t daliyaa +stream and sauteed vegetables"); + map1.put(d25, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, avocado sandwich on whole-grain bread\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d26, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, avocado sandwich on whole-grain bread\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d27, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, avocado sandwich on whole-grain bread\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d28, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, green vegetables + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d29, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, green vegetables + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + salad + sprouts "); + map1.put(d30, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, green vegetables + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + salad + sprouts "); + map1.put(d31, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d32, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato, green vegetables + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + 1 chapatti + salad + sprouts "); + map1.put(d33, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, and yogurt" + + "\n\n Lunch \t\t tomato + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t 1 cup arhar dal + salad + sprouts "); + map1.put(d34, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, fruit, and yogurt" + + "\n\n Lunch \t\t tomato + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t porridge + salad + sprouts "); + map1.put(d35, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, fruit, and yogurt" + + "\n\n Lunch \t\t tomato + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t porridge + salad"); + map1.put(d36, "\n\nMeal type\t\t What to eat" + + "\n\nBreakfast \t\t 1 glass of warm water with Lemon" + + "& fruits + Smoothie with spinach, fruit, and yogurt" + + "\n\n Lunch \t\t tomato + 1 chapati\r\n" + + "Quinoa with stir-fried vegetables " + + "\n\n Dinner\t\t porridge + salad"); + +// Map> l = new HashMap<>(); + + for(Entry entry: map1.entrySet() ) + { + String age = entry.getKey().getAge(); + String weight = entry.getKey().getWeight(); + String plan = entry.getValue(); + female_dp temp = new female_dp(); + String age1 = temp.getAge(); + String weight1 = temp.getWeight(); + //System.out.println(weight1); + if(age.compareTo(age1)==0) + { + if(weight.compareTo(weight1)==0) + { + //System.out.println(plan); + DietPlanClient d = new DietPlanClient(); + d.setPlan(plan); + Dietplan_1 abc = new Dietplan_1(); + + //System.out.println(final_plan); + break; + } + } + } +// DietPlanClient d = new DietPlanClient(); +// d.getplan(); + + + + } + + public void setPlan(String plan) + { + final_plan = plan; + } + public String getPlan() + { + return final_plan; + } + +} diff --git a/Team 66 Diet Plan Recommendations/Dietplan_1.java b/Team 66 Diet Plan Recommendations/Dietplan_1.java new file mode 100644 index 0000000..a73b20f --- /dev/null +++ b/Team 66 Diet Plan Recommendations/Dietplan_1.java @@ -0,0 +1,67 @@ +package client; + +import java.awt.BorderLayout; + +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextPane; +import java.awt.Font; +import java.awt.SystemColor; +import javax.swing.JLabel; + +public class Dietplan_1 extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Dietplan_1 frame = new Dietplan_1(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Dietplan_1() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 450, 300); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JTextPane txtpnYourDietPlan = new JTextPane(); + txtpnYourDietPlan.setBackground(SystemColor.control); + txtpnYourDietPlan.setText("YOUR DIET PLAN IS READY!!!!"); + txtpnYourDietPlan.setFont(new Font("Tahoma", Font.BOLD, 18)); + txtpnYourDietPlan.setBounds(78, 24, 318, 46); + contentPane.add(txtpnYourDietPlan); + + DietPlanClient dpc = new DietPlanClient(); + String p_plan = dpc.getPlan(); + System.out.println(p_plan); + JLabel lblNewLabel = new JLabel("New label"); + lblNewLabel.setBounds(171, 110, 119, 28); + lblNewLabel.setText(p_plan); + contentPane.add(lblNewLabel); + + + + + + + } +} diff --git a/Team 66 Diet Plan Recommendations/LoginCred.java b/Team 66 Diet Plan Recommendations/LoginCred.java new file mode 100644 index 0000000..1518851 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/LoginCred.java @@ -0,0 +1,110 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JButton; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.Font; +import javax.swing.JTextArea; +import javax.swing.JTextPane; + +public class LoginCred extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + LoginCred frame = new LoginCred(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public LoginCred() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 856, 480); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JButton btnNewButton = new JButton("SUBMIT"); + + + + + JTextArea txtrLoginId = new JTextArea(); + txtrLoginId.setFont(new Font("Tahoma", Font.BOLD, 20)); + txtrLoginId.setText("Login ID"); + + txtrLoginId.setBounds(49, 68, 101, 34); + contentPane.add(txtrLoginId); + + JTextArea txtrPassword = new JTextArea(); + txtrPassword.setFont(new Font("Tahoma", Font.BOLD, 18)); + txtrPassword.setText("Password"); + + txtrPassword.setBounds(48, 183, 109, 32); + contentPane.add(txtrPassword); + + JTextArea textArea_3 = new JTextArea(); + textArea_3.setBounds(210, 182, 353, 33); + contentPane.add(textArea_3); + + + JTextPane textPane = new JTextPane(); + + textPane.setBounds(211, 72, 351, 41); + contentPane.add(textPane); + + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String pass = textArea_3.getText(); + String id = textPane.getText(); + diet x = new diet(); + if(x.check(id, pass) == 1) + { + temperory dpt=new temperory (); + dpt.main(null); + setVisible(false); + } + else + { + JOptionPane.showMessageDialog(textArea_3, "please enter correct credentials"); + setVisible(true); + + } + + } + + + + + + }); + btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 25)); + btnNewButton.setBounds(352, 338, 155, 52); + contentPane.add(btnNewButton); + + + } + +} diff --git a/Team 66 Diet Plan Recommendations/Loginpage.java b/Team 66 Diet Plan Recommendations/Loginpage.java new file mode 100644 index 0000000..44880a5 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/Loginpage.java @@ -0,0 +1,107 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.awt.Font; +import java.awt.SystemColor; + +public class Loginpage extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Loginpage frame = new Loginpage(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Loginpage() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 747, 462); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JButton btnNewButton = new JButton("LOGIN"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(btnNewButton.isSelected()){ + LoginCred dpt3=new LoginCred(); + dpt3.main(null); + setVisible(false); + + } + else + { + LoginCred dpt4=new LoginCred(); + dpt4.main(null); + setVisible(false); + + } + + + } + }); + btnNewButton.setBackground(SystemColor.control); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 25)); + btnNewButton.setBounds(318, 59, 149, 42); + contentPane.add(btnNewButton); + + JButton btnNewButton_1 = new JButton("OR"); + btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 15)); + btnNewButton_1.setBounds(350, 121, 85, 21); + contentPane.add(btnNewButton_1); + + JButton btnNewButton_2 = new JButton("SIGN UP"); + btnNewButton_2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(btnNewButton_2.isSelected()){ + Signup dpt5=new Signup(); + dpt5.main(null); + setVisible(false); + + } + else + { + Signup dpt5=new Signup(); + dpt5.main(null); + setVisible(false); + + } + + + } + }); + btnNewButton_2.setBackground(SystemColor.control); + btnNewButton_2.setFont(new Font("Tahoma", Font.BOLD, 25)); + btnNewButton_2.setBounds(293, 162, 213, 69); + contentPane.add(btnNewButton_2); + } +} diff --git a/Team 66 Diet Plan Recommendations/Profile.java b/Team 66 Diet Plan Recommendations/Profile.java new file mode 100644 index 0000000..fcd502f --- /dev/null +++ b/Team 66 Diet Plan Recommendations/Profile.java @@ -0,0 +1,52 @@ +package client; +import java.util.Date; + +public class Profile { + private long id; + private Date creationDate = null; + private Date birthDate = null; + private String name = " "; +public Profile(long id, Date creationDate, Date birthDate, String name) { + super(); + this.id = id; + this.creationDate = creationDate; + this.birthDate = birthDate; + this.name = name; +} +public long getId() { + return id; +} +public void setId(long id) { + this.id = id; +} +public Date getCreationDate() { + return creationDate; +} +public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; +} +public Date getBirthDate() { + return birthDate; +} +public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} + +public boolean equals(Profile p) { + boolean birthdayequals = false; + if(p==null) return false; + if(birthDate==null && p.birthDate==null) birthdayequals = true; + else if(birthDate==null && p.getBirthDate()!= null) birthdayequals = false; + else if(birthDate!=null && p.getBirthDate()== null) birthdayequals = false; + else if(!p.birthDate.equals(birthDate)) birthdayequals = false; + + return birthdayequals && p.name.equals(name); + +} +} diff --git a/Team 66 Diet Plan Recommendations/Signup.java b/Team 66 Diet Plan Recommendations/Signup.java new file mode 100644 index 0000000..a565724 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/Signup.java @@ -0,0 +1,103 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextField; +import javax.swing.JTextArea; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JTextPane; +import javax.swing.JButton; + +public class Signup extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Signup frame = new Signup(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Signup() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 877, 728); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JTextArea txtrFullName = new JTextArea(); + txtrFullName.setFont(new Font("Tahoma", Font.BOLD, 20)); + txtrFullName.setText("Full Name"); + txtrFullName.setBounds(49, 36, 156, 35); + contentPane.add(txtrFullName); + + JTextPane textPane = new JTextPane(); + textPane.setBounds(328, 36, 478, 35); + contentPane.add(textPane); + + JTextPane txtpnEmailId = new JTextPane(); + txtpnEmailId.setFont(new Font("Tahoma", Font.BOLD, 20)); + txtpnEmailId.setText("User ID"); + txtpnEmailId.setBounds(54, 152, 151, 35); + contentPane.add(txtpnEmailId); + + JTextPane textPane_1 = new JTextPane(); + textPane_1.setBounds(325, 148, 478, 35); + String id = textPane_1.getText(); + contentPane.add(textPane_1); + + JTextPane txtpnPassword = new JTextPane(); + txtpnPassword.setFont(new Font("Tahoma", Font.BOLD, 20)); + txtpnPassword.setText("Password"); + txtpnPassword.setBounds(49, 274, 156, 35); + contentPane.add(txtpnPassword); + + JTextPane textPane_2 = new JTextPane(); + textPane_2.setBounds(328, 272, 478, 37); + String pass = textPane_2.getText(); + contentPane.add(textPane_2); + + JButton btnNewButton = new JButton("SUBMIT"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + diet d = new diet(); + d.add_u(id, pass); + temperory dpt1=new temperory (); + dpt1.main(null); +// LoginCred l = new LoginCred(); +// l.main(null); + setVisible(false); + + + + + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 25)); + btnNewButton.setBounds(347, 484, 163, 80); + contentPane.add(btnNewButton); + } + +} diff --git a/Team 66 Diet Plan Recommendations/Welcomepage.java b/Team 66 Diet Plan Recommendations/Welcomepage.java new file mode 100644 index 0000000..ef99ea8 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/Welcomepage.java @@ -0,0 +1,103 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextPane; +import java.awt.Font; +import java.awt.Color; +import java.awt.SystemColor; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JTextArea; +import javax.swing.JComboBox; +import javax.swing.JTextField; +import javax.swing.JButton; + +public class Welcomepage extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Welcomepage frame = new Welcomepage(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Welcomepage() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 644, 565); + contentPane = new JPanel(); + contentPane.setForeground(Color.LIGHT_GRAY); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JTextArea txtrWelcome = new JTextArea(); + txtrWelcome.setBackground(SystemColor.activeCaption); + txtrWelcome.setFont(new Font("Century Gothic", Font.BOLD, 35)); + txtrWelcome.setText("WELCOME"); + txtrWelcome.setBounds(234, 88, 186, 48); + contentPane.add(txtrWelcome); + + JTextArea txtrToA = new JTextArea(); + txtrToA.setBackground(SystemColor.activeCaption); + txtrToA.setFont(new Font("Century Gothic", Font.BOLD, 35)); + txtrToA.setText("To A"); + txtrToA.setBounds(277, 146, 105, 48); + contentPane.add(txtrToA); + + JTextArea txtrHealthierYou = new JTextArea(); + txtrHealthierYou.setBackground(SystemColor.activeCaption); + txtrHealthierYou.setFont(new Font("Century Gothic", Font.BOLD, 35)); + txtrHealthierYou.setText("Healthier You!"); + + txtrHealthierYou.setBounds(216, 209, 251, 62); + contentPane.add(txtrHealthierYou); + + JButton btnNewButton = new JButton("Proceed"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(btnNewButton.isSelected()){ + Loginpage dpt1=new Loginpage(); + dpt1.main(null); + setVisible(false); + + } + else + { + Loginpage dpt2=new Loginpage(); + dpt2.main(null); + setVisible(false); + + } + + + } + }); + + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 18)); + btnNewButton.setBounds(182, 345, 281, 62); + contentPane.add(btnNewButton); + } + + } + diff --git a/Team 66 Diet Plan Recommendations/diet.java b/Team 66 Diet Plan Recommendations/diet.java new file mode 100644 index 0000000..6b8d806 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/diet.java @@ -0,0 +1,32 @@ +package client; + +import java.util.HashMap; +import java.awt.BorderLayout; +import java.util.Scanner; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTable; +public class diet extends JFrame{ + private JPanel contentPane; + private JTable table; + private Object group; + int flag=0; + HashMap hm = new HashMap<>(); + + public int check(String id, String pass) { + hm.put("khushi", "123"); + if(hm.containsKey(id)) + { + if(pass.compareTo(hm.get(id))==0) + { + return 1; + } + } + return 0; + } + public void add_u(String id, String pass) + { + hm.put(id, pass); + } +} \ No newline at end of file diff --git a/Team 66 Diet Plan Recommendations/female_dp.java b/Team 66 Diet Plan Recommendations/female_dp.java new file mode 100644 index 0000000..647ac25 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/female_dp.java @@ -0,0 +1,125 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextField; +import java.awt.Font; +import java.awt.SystemColor; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JTextPane; +import javax.swing.JComboBox; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JButton; + +public class female_dp extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + female_dp frame = new female_dp(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + String age = "18+"; + String weight ="30-40"; + public female_dp() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 448, 430); + contentPane = new JPanel(); + contentPane.setBorder(null); + setContentPane(contentPane); + contentPane.setLayout(null); + + JTextPane txtpnJjkkjj = new JTextPane(); + txtpnJjkkjj.setFont(new Font("Tahoma", Font.BOLD, 18)); + txtpnJjkkjj.setBackground(SystemColor.control); + txtpnJjkkjj.setText("Please enter your age:"); + txtpnJjkkjj.setBounds(98, 26, 243, 35); + contentPane.add(txtpnJjkkjj); + + JComboBox comboBox = new JComboBox(); + + comboBox.setFont(new Font("Tahoma", Font.BOLD, 18)); + comboBox.setModel(new DefaultComboBoxModel(new String[] {"18+", "30-40", "40-50", "50-60", "60-70", "70 Above"})); + comboBox.setBounds(157, 71, 90, 35); + contentPane.add(comboBox); + comboBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + age = (String)comboBox.getSelectedItem(); + System.out.println(age); + } + }); + + JTextPane txtpnPleaseEnterYour = new JTextPane(); + txtpnPleaseEnterYour.setBackground(SystemColor.control); + txtpnPleaseEnterYour.setText("Please enter your weight(in Kg):"); + txtpnPleaseEnterYour.setFont(new Font("Tahoma", Font.BOLD, 18)); + txtpnPleaseEnterYour.setBounds(64, 134, 320, 35); + contentPane.add(txtpnPleaseEnterYour); + + JComboBox comboBox_1 = new JComboBox(); + comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"30-40", "40-50", "50-60", "60-70", "70-80", "80 Above"})); + comboBox_1.setFont(new Font("Tahoma", Font.BOLD, 18)); + comboBox_1.setBounds(157, 193, 90, 43); + contentPane.add(comboBox_1); + comboBox_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + weight = (String)comboBox_1.getSelectedItem(); + System.out.println(weight); + } + }); + + JButton btnNewButton = new JButton("Proceed"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(btnNewButton.isSelected()){ + Dietplan_1 dpt=new Dietplan_1(); + dpt.main(null); + setVisible(false); + + } + else + { + Dietplan_1 dpt=new Dietplan_1(); + dpt.main(null); + setVisible(false); + + } + + + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 18)); + btnNewButton.setBounds(126, 287, 154, 58); + contentPane.add(btnNewButton); + } + public String getAge() + { + return age; + } + public String getWeight() + { + return weight; + } +} diff --git a/Team 66 Diet Plan Recommendations/male_dp.java b/Team 66 Diet Plan Recommendations/male_dp.java new file mode 100644 index 0000000..bcc95f8 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/male_dp.java @@ -0,0 +1,100 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import java.awt.Font; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import java.awt.Color; +import java.awt.SystemColor; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JComboBox; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JButton; + +public class male_dp extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + male_dp frame = new male_dp(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public male_dp() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 472, 452); + contentPane = new JPanel(); + contentPane.setBackground(SystemColor.control); + contentPane.setBorder(null); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("Please enter your age:"); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18)); + lblNewLabel.setBounds(86, 19, 286, 29); + contentPane.add(lblNewLabel); + + JComboBox comboBox = new JComboBox(); + comboBox.setFont(new Font("Tahoma", Font.BOLD, 18)); + comboBox.setModel(new DefaultComboBoxModel(new String[] {"18+", "30-40", "40-50", "50-60", "60-70", "70 Above"})); + comboBox.setBounds(122, 58, 81, 38); + contentPane.add(comboBox); + + JComboBox comboBox_1 = new JComboBox(); + comboBox_1.setFont(new Font("Tahoma", Font.BOLD, 18)); + comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"30-40", "40-50", "50-60", "60-70", "70-80", "80 Above"})); + comboBox_1.setBounds(130, 183, 92, 38); + contentPane.add(comboBox_1); + + JTextPane txtpnPleaseEnterYour = new JTextPane(); + txtpnPleaseEnterYour.setBackground(SystemColor.control); + txtpnPleaseEnterYour.setText("Please enter your weight:"); + txtpnPleaseEnterYour.setFont(new Font("Tahoma", Font.BOLD, 18)); + txtpnPleaseEnterYour.setBounds(85, 132, 274, 48); + contentPane.add(txtpnPleaseEnterYour); + + JButton btnNewButton = new JButton("PROCEED"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(btnNewButton.isSelected()){ + Dietplan_1 dpt=new Dietplan_1(); + dpt.main(null); + setVisible(false); + } + else { + Dietplan_1 dpt=new Dietplan_1(); + dpt.main(null); + setVisible(false); + } + + + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 18)); + btnNewButton.setBounds(130, 292, 142, 53); + contentPane.add(btnNewButton); + } +} diff --git a/Team 66 Diet Plan Recommendations/temperory.java b/Team 66 Diet Plan Recommendations/temperory.java new file mode 100644 index 0000000..ca37fb5 --- /dev/null +++ b/Team 66 Diet Plan Recommendations/temperory.java @@ -0,0 +1,193 @@ +package client; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextField; +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; +import javax.swing.JRadioButton; +import javax.swing.LayoutStyle.ComponentPlacement; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JTextArea; +import javax.swing.JTable; +import javax.swing.JTextPane; +import javax.swing.JToggleButton; +import javax.swing.JComboBox; +import javax.swing.ButtonGroup; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JTree; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.JProgressBar; +import javax.swing.JScrollBar; +import javax.swing.JSlider; +import javax.swing.JLabel; +import javax.swing.JOptionPane; + +import java.awt.Font; +import java.awt.SystemColor; + +public class temperory extends JFrame { + + private JPanel contentPane; + private JTable table; + private Object group; + int flag=0; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + temperory frame = new temperory(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public temperory() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 633, 539); + contentPane = new JPanel(); + contentPane.setBackground(SystemColor.activeCaption); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + + JRadioButton rdbtnNewRadioButton = new JRadioButton("FEMALE"); +// rdbtnNewRadioButton.addKeyListener(new KeyAdapter() { +// @Override +// public void keyPressed(KeyEvent e) { +// System.out.println("female"); +// } +// }); + + + JRadioButton rdbtnNewRadioButton_1 = new JRadioButton("MALE"); +// rdbtnNewRadioButton_1.addActionListener(new ActionListener() { +// public void actionPerformed(ActionEvent e) { +//// display_dietplan d = new display_dietplan(); +// flag=1; +// } +// }); + ButtonGroup bg=new ButtonGroup(); + bg.add(rdbtnNewRadioButton);bg.add(rdbtnNewRadioButton_1); + + JCheckBox chckbxNewCheckBox_10= new JCheckBox("40-50"); + + JCheckBox chckbxNewCheckBox_11 = new JCheckBox("50-60"); + + JCheckBox chckbxNewCheckBox_12 = new JCheckBox("60-70"); + + JCheckBox chckbxNewCheckBox_= new JCheckBox("70 Above"); + + table = new JTable(); + + JToggleButton tglbtnNewToggleButton = new JToggleButton("welcome"); + tglbtnNewToggleButton.setFont(new Font("Times New Roman", Font.BOLD | Font.ITALIC, 20)); + + int[] arr1= {18,}; + + JButton btnNewButton = new JButton("START"); + + JButton tb2 = new JButton("Major"); + + JLabel lblNewLabel = new JLabel("DIET PLAN"); + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 19)); + + JLabel lblNewLabel_1 = new JLabel("PLEASE CHOOSE YOUR GENDER"); + lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 18)); + + JButton btnNewButton_1 = new JButton("SUBMIT"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + if(rdbtnNewRadioButton_1.isSelected()){ + male_dp md = new male_dp(); + md.main(null); + setVisible(false); + } + if(rdbtnNewRadioButton.isSelected()) + { + female_dp fdp=new female_dp(); + fdp.main(null); + setVisible(false); + } + + } + }); + btnNewButton_1.setBackground(SystemColor.control); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 15)); + + + + GroupLayout gl_contentPane = new GroupLayout(contentPane); + gl_contentPane.setHorizontalGroup( + gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(163) + .addComponent(rdbtnNewRadioButton, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE) + .addGap(94) + .addComponent(rdbtnNewRadioButton_1, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE) + .addContainerGap(283, Short.MAX_VALUE)) + .addGroup(gl_contentPane.createSequentialGroup() + .addContainerGap(184, Short.MAX_VALUE) + .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING) + .addGroup(gl_contentPane.createSequentialGroup() + .addComponent(btnNewButton) + .addPreferredGap(ComponentPlacement.RELATED)) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE) + .addComponent(tglbtnNewToggleButton, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE))) + .addGap(331) + .addComponent(table, GroupLayout.PREFERRED_SIZE, 1, GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(189) + .addComponent(lblNewLabel_1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(293)) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(269) + .addComponent(btnNewButton_1) + .addContainerGap(390, Short.MAX_VALUE)) + ); + gl_contentPane.setVerticalGroup( + gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(21) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE) + .addGap(18) + .addComponent(tglbtnNewToggleButton) + .addGap(14) + .addComponent(lblNewLabel_1, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE) + .addGap(18) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) + .addComponent(rdbtnNewRadioButton_1) + .addComponent(rdbtnNewRadioButton)) + .addGap(38) + .addComponent(btnNewButton_1) + .addGap(66) + .addComponent(table, GroupLayout.PREFERRED_SIZE, 1, GroupLayout.PREFERRED_SIZE) + .addGap(199) + .addComponent(btnNewButton) + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + contentPane.setLayout(gl_contentPane); + } +}