Checking to see if a button is visible


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Checking to see if a button is visible

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    3

    Checking to see if a button is visible

    I need to know the line of code required to check to see if a button is visible at the time. I want the program to check if the button is visible, and if it is visible, hide it. If it's not visible, show it.

  2. #2
    Join Date
    Nov 2006
    Posts
    12
    try something like this
    if(button.isVisible()){button.setVisible(False)}
    else{button.setVisible(true)}

    the isVisible is inherited from Component and setVisible is inherited from JComponent.

    not sure if this will work though as I'm just learning too, but maybe will help

Similar Threads

  1. Replies: 7
    Last Post: 07-16-2013, 11:47 PM
  2. An unusal issue with SPIN BUTTON
    By vipin_pc in forum VB Classic
    Replies: 8
    Last Post: 11-17-2006, 02:22 PM
  3. Need help with calculator...
    By 2eXtreme in forum Java
    Replies: 0
    Last Post: 04-05-2006, 07:38 AM
  4. button listener not working
    By DrunkinP in forum Java
    Replies: 0
    Last Post: 03-31-2005, 09:36 AM
  5. Replies: 0
    Last Post: 11-20-2002, 11:16 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center