aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes crazy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "crazy" Watch "crazy" New topic
Author

crazy

sammaiah kyatham
Ranch Hand

Joined: Aug 03, 2003
Posts: 104
Hi all,
Iam using Windows 2000 advanced server.
Java
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

My code:

package test;

import javax.swing.JFrame;

public class Test extends JFrame{

public Test(){
setSize(1000,300);
setVisible(true);
}
public static void main(String[] args) {
new Test();
}
}

As per the code, a empty frame has to display with size 1000,300.
but nothing is visible. no error, no output.

Previously I've worked on java version 1.4.0 and XP os.
is there any changes in latest version of swing?

Thanks,
sam
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Nothing wrong with the code. Perhaps there's something wrong with the machine. Do other Swing apps work?


[Jess in Action][AskingGoodQuestions]
sammaiah kyatham
Ranch Hand

Joined: Aug 03, 2003
Posts: 104
No Ernest Friedman-Hill,
Now I loaded java 1.4.0, same program is working fine.
I can't get it what is the problem?

Thanks,
sam
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Maybe your download of JDK 1.4.2 is bad? Did you try re-installing it, or downloading it again and then re-installing?

In any case, it has nothing to do with the JDK version -- it's just a problem with your setup.
 
 
subject: crazy