Results 1 to 3 of 3
  1. #1
    vassil_zorev is offline Member
    Join Date
    Dec 2007
    Posts
    4
    Rep Power
    0

    Default JButton.hide/showText() feature ?

    I am aware that this issue was discussed many times but still couldn't find what I needed.
    There is this little game I'm trying to write in Java and for its purpose I need to be able to hide the text of a JButton (not delete it - I still need it, even though it is hidden!) and to be able to display it when I like. Since JButton has no such method and I am kinda newbie on the matter I would much appreciate your help :)

  2. #2
    tim's Avatar
    tim
    tim is offline Senior Member
    Join Date
    Dec 2007
    Posts
    435
    Rep Power
    7

    Default Save the text

    Hello vassil_zorev.

    It will probably be simpler if you save the text in memory and delete the text in the button. If you need it again, just use it from memory. :D
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

  3. #3
    vassil_zorev is offline Member
    Join Date
    Dec 2007
    Posts
    4
    Rep Power
    0

    Default

    That's exactly what I came up with, too. Thanks though, tim :)

Similar Threads

  1. How to Hide cursor
    By priya in forum Java Software
    Replies: 1
    Last Post: 12-09-2010, 09:39 PM
  2. [SOLVED] Hide the titlebar of a JEditorPane
    By Eranga in forum AWT / Swing
    Replies: 1
    Last Post: 03-28-2008, 10:28 AM
  3. java : how to hide application icon from a task bar
    By yogeshagashe in forum Advanced Java
    Replies: 0
    Last Post: 03-12-2008, 01:05 PM
  4. To hide browser heading
    By priyanka_t in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 01-09-2008, 07:56 AM
  5. Hide hyperlink address on status bar
    By simon in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-24-2007, 10:34 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
  •