Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Changing A Order?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Changing A Order?

    If I have a project (pizza delivery for example) and I have already set it up so that the user can make an order, which includes pizza topping, size, etc. If I want to allow the option to change the order, as in go back to any point in the ordering process and start again, how would I do that?


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,180
    My Mood
    Hungover
    Thanks
    141
    Thanked 602 Times in 517 Posts

    Default Re: Changing A Order?

    This isn't really a question we can answer, because it's going to depend entirely on the context of your program. Is it a gui program? A command line program? A website? Something else? Which part of it is giving you trouble?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Changing A Order?

    Basically Im writing a Java Application on NetBeans IDE 7.4. I am pretty new to Java and it was hard enough to get to where I am right now. I just don't really know how to create the option for the user to edit a order they have already made.

    ***EDIT***

    Is there a code which would allow me to take the customer back to the beginning of the "add new order" which they select change order?

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,180
    My Mood
    Hungover
    Thanks
    141
    Thanked 602 Times in 517 Posts

    Default Re: Changing A Order?

    Again, this entirely depends on your program, and not on your IDE. Is it a command line application? A Swing gui? Something else?

    There isn't a magic "go back" function in Java, but you might be able to accomplish what you want with a loop (for a command line program) or a CardLayout (for a Swing gui).

    Alternatively, you might have to create a new part of your program for the feature allowing users to edit an existing order. Again, how you do that is going to depend entirely on the type of program you're writing.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,495
    My Mood
    Mellow
    Thanks
    152
    Thanked 610 Times in 597 Posts

    Default Re: Changing A Order?

    Does your program currently have a menu? If so, add an "Edit" option. If not, then add a menu that includes an Edit option.

    If a GUI, there may not be an obvious menu, but there should be options the user chooses to add toppings, drinks, place the order, etc. Once an order has been placed, then the user might be presented with after-ordering options to find the order by name or number and then edit it (if it's not already in the oven).

    As KW has so patiently stated, you need to tell us more about what you have in order for us to help you change it or add to it in a way that makes sense. Why the mystery?

  6. #6
    Junior Member
    Join Date
    Jan 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Changing A Order?

    Oh yep sorry its a GUI.

    --- Update ---

    Quote Originally Posted by KevinWorkman View Post
    Again, this entirely depends on your program, and not on your IDE. Is it a command line application? A Swing gui? Something else?

    There isn't a magic "go back" function in Java, but you might be able to accomplish what you want with a loop (for a command line program) or a CardLayout (for a Swing gui).

    Alternatively, you might have to create a new part of your program for the feature allowing users to edit an existing order. Again, how you do that is going to depend entirely on the type of program you're writing.
    Thats what I had in mind I just don't have much experience so I wasn't really sure how to go about it.

  7. #7
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,180
    My Mood
    Hungover
    Thanks
    141
    Thanked 602 Times in 517 Posts

    Default Re: Changing A Order?

    Quote Originally Posted by ForeverHeat View Post
    Thats what I had in mind I just don't have much experience so I wasn't really sure how to go about it.
    If you created a gui for placing orders in the first place, the process of creating a gui for editing orders is going to be about the same.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Order of growth
    By Scorks in forum Algorithms & Recursion
    Replies: 1
    Last Post: November 13th, 2013, 11:27 AM
  2. Order of printing
    By DerrickMartin in forum Java Theory & Questions
    Replies: 2
    Last Post: February 20th, 2013, 04:54 AM
  3. [SOLVED] Alphabetical order
    By sbjibo in forum What's Wrong With My Code?
    Replies: 12
    Last Post: May 16th, 2012, 03:20 PM
  4. Threads in some order...
    By aps135 in forum Threads
    Replies: 6
    Last Post: March 11th, 2011, 04:54 PM
  5. Stack Order?
    By TimW in forum AWT / Java Swing
    Replies: 2
    Last Post: September 19th, 2009, 07:33 AM