Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

empty application frame  RSS feed

 
Caroline Santoni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a really weird problem that I can't understand.
I have developped an application that works fine. When I distributed it and tried to use it on another computer, I got only an empty frame (with the size automatically computed to contain the components), with the background that I had defined in my Theme.
By searching in the forum, I saw there could be some interactions with resizing, but I havn't tested it yet.
I use on both computers JDK 1.4.1_03, and the problems happen also by launching from Eclipse.
I made some kind of Hello world application, and the same problem appears :

public class TestApplication {

public static void main(String[] args) throws IOException {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}

private static void createAndShowGUI() {
JFrame frame = new JFrame("TEST");
frame.getContentPane().add(new JLabel("test"));

frame.pack();
frame.setVisible(true);
}


}

What am I doing wrong ? Why is it working on one computer and not on the other ?

Thanks,
Caroline
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Caroline,

Welcome to JavaRanch!

There's nothing wrong with your test application; it should run everywhere that Java is properly installed. You've seen these problems only on one machine, I'm assuming; there's something wrong with that machine. Tell us about it; maybe we can figure out what's going on. What OS? What version(s) of Java are installed?
 
Caroline Santoni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your quick answer

Too bad... I hoped I had done domething wrong
I have tested my application on 3 PCs :
- PC win2000 Pro , jdk 1.4.1_03 => ok
- laptop winXP , jdk? => ok
- PC winXP , jdk1.4.1_03 => KO
I have made sure the JDK used is that by uninstalling all others versions of JDK and by calling java -version to check.
My eclipse project has been cleaned and built with jdk1.4.1_03.
I'll try resizing, maybe it will give us a hint.

Caroline
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!