Link to home
Start Free TrialLog in
Avatar of TheLegacY
TheLegacY

asked on

Java JFrame: complete blank Frame

When i program in JFrame, i get a complete blank Frame. When i move press my Windows Start button, i see the content. When i put the startmenu away, it freezes, when i hover over the buttons WHILE start-menu is up, it "animates", otherwise it freezes...
This is on a 64bit PC, X800XT card, 2GB memory.
On my Laptop, who's not remotely close to the quality of my pc (chipset graphics, 512MB memory, P4 2.6), it works perfect.


What to do?
Avatar of Giant2
Giant2

What is the JDK version you use on both Pc to run it?
(On 64 bit you must have a 64 bit versione)

Bye, Giant.
Avatar of TheLegacY

ASKER

Hi Giant2,

This is running on both machines: J2SE 5.0 Update 6 and NB 5.0 for Windows (J2SE + NetBeans (-> this has the same problem to run as JFrame). I didn't get a choice to download a 64bit version.
My OS on both machines is Windows XP Pro edition, SP2.
On the choice page you have the last choice:
>Windows AMD64 Platform - J2SE(TM) Development Kit 5.0 Update 6
file is: jdk-1_5_0_06-windows-amd64.exe
Hm, bizar.

It says it doesn't support my type of CPU (AMD Athlon 64 3200+) while installing.
You can't install a 64 bit java runtime on a 32 bit operating system.  Unless you have Windows x64, you will be totally fine with the 32 bit version (as far as I know, makes no sense to have a compiled 64 bit application running on a 32 bit operation system!)
really bizar!
Sure it is an AMD 64? I think yes. Maybe it's too new.
ok fffej78,

But, since it doesn't work fine on the 32bit one, any suggestions? :)
If you create a simple JFrame and add on it a JButton. The problem is given again?
To illustrate you the problem:

http://users.pandora.be/Robemoes/Pics/Jframe

jframe_code.jpg: the code i use (very simple borderlayout-example)

jframe_blank.jpg: when i run the application

jframe_startmenu.jpg: when i open startmenu, en hover over the buttons they appear one by one (notice the titlebar doesn't appear since it hasn't got any "animation".
I believe the invokeLater() finish really before the component is on (maybe for the quickness of your Pc).
So when the construction finish, the program is allready finished and the system cannot jnow what it must do.
Try to use the InvokeAndWait instead.
I replaced it with this:

       try{
             javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                  public void run() {
                      createAndShowGUI();
                  }
              });
        }catch (Exception e) {
             e.printStackTrace();
        }
and it changes nothing. No exception, same problem.
And removing all (call directly createAndShowGUI()) ?
Tried that too, same.

I don't think it's a code problem. It's very strange imo.
After this I think too (for this reason I told you the 64 bit JDK). No other ideas, sorry.
ASKER CERTIFIED SOLUTION
Avatar of fffej78
fffej78

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
K, updated driver (i used the previous of the very last one), and it worked...

Thanks for the tip fffej78, points going to you.