Results 1 to 12 of 12

Thread: App Project

  1. #1
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Cool App Project

    Hey guys,

    My name is Aaron Boyse and I am writing (trying to) a Java App for my local Gym. We want it to be a Circuit App with Drop-down menus for to: Choose a Circuit, Set, Number of Minutes for Work-Out Time and Rest Time.

    I also want a Test area also, if possible a link to the persons Facebook and Twitter.

    How do I code is, as this is my first Java Project.

    Thanks for your help!

    Kind Regards,

    Aaron Boyse

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    It is not that simple. There are lots of things you need to learn before writing an Android app.
    You haven't mentioned what you currently know.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Default Re: App Project

    Well, I know Java and am using JButtons and JFrames. Want to have a look at my code?

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    Android GUI does not use Swing.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Default Re: App Project

    How did you take that from not reading my code?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    JButtons and JFrames are Swing classes.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Default Re: App Project

    Ok, want to see my code...

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    If you have questions about your code, post it and ask your questions.
    If you don't understand my response, don't ignore it, ask a question.

  9. #9
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Default Re: App Project

    package Project;

    import javax.swing.JOptionPane;
    public class KettleCircuit {

    public static void main(String[] a) {
    String[] choices = { "Circuit 1", "Circuit 2", "Circuit 3", "Circuit 4", "Circuit 5" };//Beginner, Intermediate, Advanced, Expert
    String input = (String) JOptionPane.showInputDialog(null, "Choose a Circuit");
    String input1 = (String) JOptionPane.showInputDialog(null, "Choose a Set");
    String input2 = (String) JOptionPane.showInputDialog(null, "Set a Time log");
    String input3 = (String) JOptionPane.showInputDialog(null, "Set a Rest Time");
    String input4 = (String) JOptionPane.showInputDialog(null, "Test yourelf today");
    String[] choices1 = {"Jerk", "Snatch", "Long Cycle"};
    String[] sets = { "Set 1", "Set 2", "Set 3", "Set 4", "Set 5"};
    String[] minutes = {"5 Minutes", "10 Minutes", "15 Minutes", "20 Minutes"};
    String[] restTime = {"2 Minutes", "4 Minutes", "6 Minutes", "10 Minutes"};


    System.out.println("You have selected");
    System.out.println(input);
    System.out.println(input1);
    System.out.println("You have chosen the"+" "+input4+" "+"test");
    System.out.println(input2 +" " +"Work Out Time");
    System.out.println(input3 +" "+"Rest Period");

    }



    }

    I want to get it to be one JFrame with multiple drop-down menus

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    Please edit your post and wrap your code with code tags:
    [code]
    YOUR CODE GOES HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my response, don't ignore it, ask a question.

  11. #11
    aboyse1990 is offline Member
    Join Date
    Nov 2014
    Posts
    61
    Rep Power
    0

    Default Re: App Project

    Java Code:
    package Project;
    
    import javax.swing.JOptionPane;
    public class KettleCircuit {
    
    public static void main(String[] a) {
    String[] choices = { "Circuit 1", "Circuit 2", "Circuit 3", "Circuit 4", "Circuit 5" };//Beginner, Intermediate, Advanced, Expert
    String input = (String) JOptionPane.showInputDialog(null, "Choose a Circuit");
    String input1 = (String) JOptionPane.showInputDialog(null, "Choose a Set");
    String input2 = (String) JOptionPane.showInputDialog(null, "Set a Time log");
    String input3 = (String) JOptionPane.showInputDialog(null, "Set a Rest Time");
    String input4 = (String) JOptionPane.showInputDialog(null, "Test yourelf today");
    String[] choices1 = {"Jerk", "Snatch", "Long Cycle"};
    String[] sets = { "Set 1", "Set 2", "Set 3", "Set 4", "Set 5"};
    String[] minutes = {"5 Minutes", "10 Minutes", "15 Minutes", "20 Minutes"};
    String[] restTime = {"2 Minutes", "4 Minutes", "6 Minutes", "10 Minutes"};
    
    
    System.out.println("You have selected");
    System.out.println(input);
    System.out.println(input1);
    System.out.println("You have chosen the"+" "+input4+" "+"test");
    System.out.println(input2 +" " +"Work Out Time");
    System.out.println(input3 +" "+"Rest Period");
    
    }
    
    
    
    }

  12. #12
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: App Project

    The code has lost all its indentations. Logically nested statements need to be indented to show the logic.

    If you need help with Swing GUI see the tutorial: https://docs.oracle.com/javase/tutor...ing/index.html

    Moved from Android section.
    Last edited by Norm; 11-11-2014 at 04:23 PM.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 2
    Last Post: 06-26-2014, 08:43 PM
  2. convert dynamic web project to maven project
    By Achouri in forum Apache Maven
    Replies: 0
    Last Post: 04-23-2014, 03:31 AM
  3. Replies: 7
    Last Post: 11-27-2012, 11:16 AM
  4. Creating a project in eclipse from existing project
    By Suraiya in forum New To Java
    Replies: 1
    Last Post: 10-08-2011, 10:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •