This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes JFrame Title not displayed (hp unix) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame Title not displayed (hp unix)" Watch "JFrame Title not displayed (hp unix)" New topic

JFrame Title not displayed (hp unix)

Ban Bala

Joined: Jul 02, 2002
Posts: 14
My application's title bar is missing when I run from hp unix. The same code works well in Windows NT. Even this example code below doesn't display its titlebar.
What could possibly cause the problem?
I compile with this
/opt/java1.3/bin/javac -classpath .:/opt/java1.3/lib
I run with this:
/opt/java1.3/bin/java -classpath .:/opt/java1.3/lib FrameDemo

The code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FrameDemo {
public static void main(String s[]) {
JFrame frame = new JFrame("FrameDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
JLabel emptyLabel = new JLabel("");
emptyLabel.setPreferredSize(new Dimension(175, 100));
frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Possibly the JDK you are using... or the way the machine itself is set up might be messed up... I would test a different version of Java on the machine, or run your app on another HP Unix machine to see where the problem is.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Ban Bala

Joined: Jul 02, 2002
Posts: 14
Thanks Nathan,
Testing on different hp system also produced the same result. The problem seems to be something like "reflection x + swing".
There is a bug roughly like this at
It is sorta covered in the JavaRanch Style Guide.
subject: JFrame Title not displayed (hp unix)