Results 1 to 12 of 12
Like Tree4Likes
  • 1 Post By JosAH
  • 2 Post By DarrylBurke
  • 1 Post By Fubarable

Thread: Remember the text in JTextField

  1. #1
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Remember the text in JTextField

    I want the JTextField to remember the latest data which the user has entered after the application is closed and again restarted.
    How to do?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: Remember the text in JTextField

    Use a file system for the persistency of (all) your data.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: Remember the text in JTextField

    Jos,
    do reply something that is very easily adaptable by a java beginner. or else dont reply.

  4. #4
    ozyhale is offline Member
    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Cool Re: Remember the text in JTextField

    a simple way is to use file input/output (file io)

  5. #5
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: Remember the text in JTextField

    Is it that I have to write the value of JTextField into a temporary file and reload the latest data into the text area every time the program is executed...?

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: Remember the text in JTextField

    Quote Originally Posted by seredi View Post
    Jos,
    do reply something that is very easily adaptable by a java beginner. or else dont reply.
    Huh? Well, here are the suitable tutorials for you then ...

    kind regards,

    Jos
    PhQ likes this.
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    seredi is offline Member
    Join Date
    Sep 2011
    Posts
    14
    Rep Power
    0

    Default Re: Remember the text in JTextField

    Instead of making me search for a "pin in haystack" (Tutorials),if you know why dont you give some programming write ups.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: Remember the text in JTextField

    Quote Originally Posted by seredi View Post
    Instead of making me search for a "pin in haystack" (Tutorials),if you know why dont you give some programming write ups.
    This is not a code sweat shop; you want some code so you write the code; if you're stuck you can come here and we'll help you, but we are not going to spoonfeed you.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,240
    Rep Power
    19

    Default Re: Remember the text in JTextField

    Quote Originally Posted by seredi View Post
    Instead of making me search for a "pin in haystack" (Tutorials),if you know why dont you give some programming write ups.
    Being rude to those who are trying to help and guide you deosn't motivate others to even try. If you want to call the shots, you should seek paid help.

    db
    fam2315 and Fubarable like this.

  10. #10
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default Re: Remember the text in JTextField

    Try the Properties API might work for you.

  11. #11
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default Re: Remember the text in JTextField

    Quote Originally Posted by seredi View Post
    Instead of making me search for a "pin in haystack" (Tutorials),if you know why dont you give some programming write ups.

    wow

  12. #12
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Remember the text in JTextField

    Quote Originally Posted by seredi View Post
    Jos,
    do reply something that is very easily adaptable by a java beginner. or else dont reply.
    Quote Originally Posted by seredi View Post
    Instead of making me search for a "pin in haystack" (Tutorials),if you know why dont you give some programming write ups.
    So, let me get this straight, a volunteer who is being paid nothing is taking time out from his work/family/play and is giving you free advice, and you are choosing to criticize him for doing this and to demand how you want your free advice served up? Did I miss anything? Am I getting this wrong?

    Most folks if they don't understand advice given thank the volunteer for his time and effort and then politely ask for clarification, and usually quickly get this, but since this is not good enough for you, please feel free to leave this forum any time you wish. I don't think that you'll be sorely missed.
    Last edited by Fubarable; 09-21-2011 at 06:59 PM.
    DarrylBurke likes this.

Similar Threads

  1. Dynamically input text JTextField. Is it possible?
    By africanhacker in forum New To Java
    Replies: 2
    Last Post: 03-21-2011, 04:23 PM
  2. Reaplacing text in JTextField
    By PhQ in forum New To Java
    Replies: 5
    Last Post: 04-14-2010, 12:25 AM
  3. grabbing text from JTextField and replace it.
    By jimmy-lin in forum New To Java
    Replies: 1
    Last Post: 11-16-2009, 09:09 AM
  4. Replies: 8
    Last Post: 08-13-2009, 04:23 AM
  5. Replies: 5
    Last Post: 01-17-2008, 09:01 PM

Posting Permissions

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