DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

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: 4
    Last Post: 10-23-2011, 02: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

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links