Results 1 to 2 of 2
  1. #1
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Retaining String

    Hi again,

    I wonder if there's any way to retain a string...username.
    I usually put a login class before the program.
    and I use
    programclass.main(null) >> to open the 2nd class.
    loginclass.this.dispose() >> to dispose the login class.

    Problem is I can't have the username retained for the 2nd class.
    I worked around it using DB as I need a login history as well (saving the value on the login n query it on the 2nd class to evaluate the value), however now I don't need history so I wonder if there's a direct way of retaining the username from the login class.

    This sounds so very basic, I don't really know where I should read about this matter hence asking here.


    Thanks in advance,
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

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

    Default Re: Retaining String

    None of that makes much sense, byt the way.
    I can't make head nor tails of what your code looks like from that description.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Variable not retaining value
    By MichaelT in forum New To Java
    Replies: 11
    Last Post: 06-10-2011, 10:02 PM
  2. Colour increasing and retaining animation
    By monica in forum Java 2D
    Replies: 7
    Last Post: 05-15-2011, 04:56 PM
  3. Replies: 0
    Last Post: 11-30-2010, 05:09 PM
  4. Replies: 18
    Last Post: 07-19-2010, 12:18 PM
  5. Replies: 4
    Last Post: 03-26-2009, 09:42 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
  •