Solved

Application GUI Interface "greys" out

Posted on 2006-11-24
9
200 Views
Last Modified: 2012-05-05
Hi,

I have a Java Application that after a period of time "grey"'s out the GUI interface.. ie : the application itself is visible but the GUI interface ( buttons, text fields etc ) are not.. The application does not stall as the logging continues to work as does its port communiction. The design is such that every port communication being done is runningit its own thread therefore i cannot understand why its lokking up. Note that I start the GUI using

                       SwingUtilities.invokeAndWait(new Runnable() {
                        public void run() {
                              try {
                                    UIManager.setLookAndFeel(UIManager
                                                .getSystemLookAndFeelClassName());
                              } catch (Exception ex) {/* IGNORE use default L & F instead */
                              }

                              new Application();
                        }
                  });

I assume this is OK to use ?
0
Comment
Question by:oddbin
  • 5
  • 2
9 Comments
 
LVL 24

Expert Comment

by:sciuriware
ID: 18008516
Greying out ...
I know a few screensavers that do this, merely on LINUX.
Is someone badgering you? Right click on the desktop and see what screensaver you got.

If I'm wrong it can only be your hardware. I had weird problems with a Matrox card
that started to scatter my screen after a few minutes.

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 18008531
About your code: why don't you do like everybody else:

     public void main(String[] av)
     {
          try
          {
               UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          }
          catch (Exception ex)
          {
                 /* IGNORE use default L & F instead */
          }
.........................

Using a thread here is insane.

;JOOP!
0
 

Author Comment

by:oddbin
ID: 18008919
Thanks for the code segemnt but I've tried all the basic stuff and nothign is working. I'm running on an XP Pro machine and have also tried it on a Win2003 box but still get the problem.. What are the main threading issues with Swing components ? and is there any main cuase to GUI's greying out ? in code ..
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 24

Expert Comment

by:sciuriware
ID: 18010543
OK, you ruled the hardware out.
As I suspect that your application is large, there is only one thing you can do:
copy the project to a new place and start pruning it there: take out part after part
that you think has nothing to do with the problem.
Finally you'll find that removing a certain thing takes away the problem.
It will take time, but that approach wins in the end; I solved almost all my
problems over decades.

;JOOP!
0
 

Author Comment

by:oddbin
ID: 18011908
Thanks for the tip.. started that yesterday but to dismay its been non stop removal since :(
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 50 total points
ID: 18011915
No, on the contrary! If you remove a part and the problem is gone
you're sitting with a large program still!
If it's a bug, would you publish the whole bulk to SUN?
No, success is when you are left with only one A4 page of source.

Success.

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 18011918
P.S.: I got a problem with JFileChooser that only happens with a large program .................

;JOOP!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
simple java question 3 59
Apps blocked by Java 9 88
how to see all occupied ports on windows 10 laptop 15 76
Cisco ASA: Java web start no go, asdm launcher no go 3 37
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question