Results 1 to 8 of 8

Thread: string hiding

  1. #1
    Join Date
    Sep 2011
    Location
    India
    Posts
    67
    Rep Power
    0

    Default string hiding

    Is there any method to hide the string while enter a string in console screen in java?

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

    Default Re: string hiding

    The console? No.

    A gui? JPasswordField.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Join Date
    Sep 2011
    Location
    India
    Posts
    67
    Rep Power
    0

    Default Re: string hiding

    i want to enter my string in console screen means dos screen. is it possible to hide the string while entering?

  4. #4
    tnrh1 is offline Senior Member
    Join Date
    Aug 2011
    Posts
    251
    Rep Power
    3

    Default Re: string hiding

    I think the only way to do that is to draw a black line over your screen

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,691
    Rep Power
    8

    Default Re: string hiding

    Quote Originally Posted by chandrasekhar.melam View Post
    i want to enter my string in console screen means dos screen. is it possible to hide the string while entering?
    I know what you want to do. I already told you it's not possible. I already told you an alternative.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Join Date
    Sep 2011
    Location
    India
    Posts
    67
    Rep Power
    0

    Default Re: string hiding

    I know what you want to do. I already told you it's not possible. I already told you an alternative

    thank you sir for your answer. But hear there's a possible to hide. somebody says java has a string method to hide the data while enter in CUI. but they dont know exact method. If you know can you send me..
    thank you

  7. #7
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,691
    Rep Power
    8

    Default Re: string hiding

    Quote Originally Posted by chandrasekhar.melam View Post
    I know what you want to do. I already told you it's not possible. I already told you an alternative

    thank you sir for your answer. But hear there's a possible to hide. somebody says java has a string method to hide the data while enter in CUI. but they dont know exact method. If you know can you send me..
    thank you
    Again, I already told you. It's a JPasswordField. That's a Java class. Look it up in the API or the basic tutorials.

    You can't control the console window like that from Java. You can create your own GUI and use a JPasswordField instead.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: string hiding

    FYI, the behavior you're describing is that of command line apps written using tools like ncurses. There are java versions go which that you can use to get a similar effect, but it is a lot of work. Curses was the hot shit of the command line world before GUIs took over, and it is every bit (if not more so) as complicated as gui development. If you google java curses, you'll find some libs you can work with, but they are most likely platform dependent. It may not be work a week of your time learning how to use one of these packages for what you want to do, in which case, do as everyone else suggested and make a simple GUI with a JTextfield or JTextArea.

Similar Threads

  1. Menu Bar hiding behind PDF in IE9
    By kraonasu in forum New To Java
    Replies: 3
    Last Post: 06-08-2011, 04:56 AM
  2. JPopupMenu not hiding
    By macwadu in forum AWT / Swing
    Replies: 8
    Last Post: 03-02-2011, 09:43 AM
  3. overriding v/s hiding
    By parminder in forum New To Java
    Replies: 3
    Last Post: 01-17-2011, 04:24 AM
  4. URL Hiding
    By sandeeprao.techno in forum Advanced Java
    Replies: 4
    Last Post: 11-20-2008, 12:55 PM
  5. Hiding parameters from URL
    By Saurabh321 in forum New To Java
    Replies: 0
    Last Post: 02-05-2008, 12:43 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
  •