DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Updating Windows/Buttons (LIVE)

    I'm looking for some code examples that show how I can update a bunch of icons and turn them green/red based on some outside variables (that will keep changing)

    Let's say that we have 3 boxes or 3 green icons.

    I have another program that will be monitoring file1.txt, file2.txt and file3.txt. When file2.txt changes to non-zero I would like to change box2/icon2 to red.

    Seems simple enough to do but I can't seem to find any examples out there.

    TIA!



  2. #2
    Join Date
    Mar 2004
    Posts
    635
    Well if it's a button, then use JButton.setIcon()

    Or ImageIcon.setImage()

  3. #3
    Join Date
    Oct 2004
    Posts
    2
    Do you have an example for a newbie?

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