Results 1 to 16 of 16

Thread: Save option

  1. #1
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default Save option

    I want to know if it is possible to put a save option on a JOptionPane dialog? If not how can I let the program save the results. I am using GUI.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,985
    Rep Power
    9

    Default

    Quote Originally Posted by Johanis View Post
    I want to know if it is possible to put a save option on a JOptionPane dialog?
    What happened when you tried?

  3. #3
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    I haven't tried anything yet, because I know nothing about saving...What do you think?

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,985
    Rep Power
    9

  5. #5
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    Thanx but that will take long and I do not have that much time as the program is due tomorrow. It is not a must to have a save option but I really want to put it in. Is there not code that you can give me please??

  6. #6
    m00nchile is offline Senior Member
    Join Date
    Feb 2010
    Location
    Ljubljana, Slovenia
    Posts
    470
    Rep Power
    5

    Default

    Begging for code won't get you far. Show us your attempt, and ask a specific question (or questions), this isn't rent a coder :D.
    Ever seen a dog chase its tail? Now that's an infinite loop.

  7. #7
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    Quote Originally Posted by m00nchile View Post
    Begging for code won't get you far. Show us your attempt, and ask a specific question (or questions), this isn't rent a coder :D.
    HAHAHA I am open for learning but I don't have any information on how to do this, not even in the textbook that we got at school! So this is why I came here: To get information on the subject. I want to know if it is even possible to have a save option in a JOptionPae Dialog, in other words I want to know if you can save the text on the Dialog, before I just jump in it and not get anything right. I am merely doing research...:)

  8. #8
    tashimoto is offline Member
    Join Date
    Sep 2010
    Location
    Oregon, usa
    Posts
    69
    Rep Power
    0

    Default

    Quote Originally Posted by Johanis View Post
    I am open for learning but I don't have any information on how to do this
    Checkout KevinWorkman's link from above and this one:

    JOptionPane (Java Platform SE 6)

  9. #9
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Smile

    Quote Originally Posted by tashimoto View Post
    Checkout KevinWorkman's link from above and this one:

    JOptionPane (Java Platform SE 6)
    Thanx hey!! maby you could point me to which one to choose in this link you gave me: [url=http://download.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html]

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,087
    Rep Power
    20

    Default

    You can stick whatever buttons you want on a JOptionPane.
    It's what you do with the users choice that you'll have to code.

    So yes, you can have a button called "Save", but to actually save whatever it is you want to save to a file (or wherever) is something you'll have to code.

  11. #11
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    You can stick whatever buttons you want on a JOptionPane.
    It's what you do with the users choice that you'll have to code.

    So yes, you can have a button called "Save", but to actually save whatever it is you want to save to a file (or wherever) is something you'll have to code.
    So how do I code it? Is there a specific way to code it? Must it be in a certain form to do it? Any form of save would do...

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,087
    Rep Power
    20

    Default

    There's already a link above to the Basic IO tutorial, so that's a good place to start.

    As for form, well the format of the save file is entirely up to you. You haven't actually said anything about what you want to save, you know.

  13. #13
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    I attached my main program...Under the Bereklone button is where the information comes together that I want to save. It is not completely finished. The program is a sort of a calculator so its numbers that I want to save...Any advice?? Oh no sorry I didn't put it in...How do I put code in?
    Last edited by Johanis; 11-03-2010 at 04:34 PM.

  14. #14
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,985
    Rep Power
    9

    Default

    If you want to provide code, you should post it as an SSCCE using the code tags and ask a specific question.

  15. #15
    Johanis is offline Senior Member
    Join Date
    Oct 2010
    Posts
    139
    Rep Power
    0

    Default

    Quote Originally Posted by KevinWorkman View Post
    If you want to provide code, you should post it as an SSCCE using the code tags and ask a specific question.
    Thank you. Sorry I am new here. How do I use code tags, or where do I find it?:o

  16. #16
    tashimoto is offline Member
    Join Date
    Sep 2010
    Location
    Oregon, usa
    Posts
    69
    Rep Power
    0

Similar Threads

  1. How can i save the data Internally(auto save)
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2010, 08:31 PM
  2. JAX-WS\METRO - apt with option option key="r"
    By Talkinjive in forum Web Frameworks
    Replies: 0
    Last Post: 01-31-2010, 04:15 PM
  3. How to enable save as option in menu after the application has been launched
    By plenitude in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 12-26-2008, 09:31 AM
  4. CVS with -f option
    By amiga23 in forum Eclipse
    Replies: 2
    Last Post: 09-22-2008, 02:57 AM
  5. Is JSP the right option?
    By Naga in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-20-2008, 06:48 AM

Posting Permissions

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