Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2004

Tip: Looking for answers? Try searching our database.

undecorated Frame/JFrame

Thread view: 
Liam Fry - 31 Jul 2004 12:51 GMT
I posted here a long time ago and no one was able to help me.
It's been quite a while, so I wanted to try again ...

I have a very unusual problem.
When I was running RedHat 7.1, my GUI-based Java applications appeared
normally.
When I upgraded to 7.2, things were still fine.
However, when I upgraded to 8.0 (what I'm running now), something broke.
Now, all my GUI-based Java applications lack top-level frame decoration.
That means I have no title bar, no border, I can't move my window, etc ...

The JDK docs clearly states that all top-level Frame's/JFrame's are
initially decorated.
That makes sense.  I have a very short program that, when run under Win32,
displays correctly.
However, when run under Linux 8.0, it's missing all top-level decorations.

I made the switch to RH8.0 while still on J2SE 1.4.0
Upgrading my version of Java hasn't helped.

Does anyone else have this problem?  Does anyone have any ideas what I could
try?
I've tried upgrading my X11 subsystem, but that hasn't helped.

Here are my particulars:

RedHat 8.0
kernel 2.4.20-28.8
XFree86-Mesa-libGL-4.2.1-23
XFree86-libs-4.2.1-23
XFree86-xauth-4.2.1-23
XFree86-font-utils-4.2.1-23
XFree86-tools-4.2.1-23
XFree86-twm-4.2.1-23
XFree86-4.2.1-23
XFree86-75dpi-fonts-4.2.1-23
XFree86-Mesa-libGLU-4.2.1-23
XFree86-xdm-4.2.1-23
XFree86-100dpi-fonts-4.2.1-23
XFree86-base-fonts-4.2.1-23
XFree86-truetype-fonts-4.2.1-23
XFree86-xfs-4.2.1-23
Java JSE 1.4.2_04-b05

Here's the little program that works under Win32 and is "broken" under RH8.0

import java.awt.*;
import javax.swing.*;

public class noframe extends JFrame
{
 public noframe ( String title ) { super( title ); }

 public static void main ( String[] args )
   throws ClassNotFoundException,
   InstantiationException,
   IllegalAccessException,
   UnsupportedLookAndFeelException
 {
   noframe noframe1 = new noframe( "You'll Never See This Title Bar" );
   noframe1.setSize( 300, 300 );
   noframe1.setLocation( 100, 100 );
   JLabel label1 = new JLabel( "This shows fine", JLabel.CENTER );
   noframe1.getContentPane().add( label1 );
   noframe1.setVisible( true );

   System.out.println( "This frame is " + (noframe1.isUndecorated() ? "un"
: "") + "decorated." );
 }
}
Thomas Weidenfeller - 02 Aug 2004 07:57 GMT
> I posted here a long time ago and no one was able to help me.
> It's been quite a while, so I wanted to try again ...

I think the last time you have been told that this is not a general Java
GUI issue but an issue with your particular OS, X11, WindowManager, VM
combination. You better ask your vendor or in a vendor specific newsgroup.

/Thomas


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.