Link to home
Start Free TrialLog in
Avatar of jpp1jpp1
jpp1jpp1

asked on

Removing JFrame titlebar pre1.4

How do I remove a JFrame titlebar?

Since 1.4 there's the setUndecorated(boolean) method, but for some reason my app (it draws the street map from a zone) runs crappy with Java versions 1.4 and above.

It is a temporary change I'd like to do, so using another swing component is not what I seek.

Thx in advance.
Avatar of girionis
girionis
Flag of Greece image

I do not think you can do it < jdk 1.4 unless you use a Window.
ASKER CERTIFIED SOLUTION
Avatar of sciuriware
sciuriware

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
Avatar of sciuriware
sciuriware

What's your problem with > 1.4?
<*>
If a JAVA application runs into problems with 1.4 or 5.0
you are sitting on a time-bomb ....
<*>
You could create a Window object and pass it a frame as parameter:

public class MyWindow extends Window
{
   JFrame myFrame = new JFrame();

   public MyWindow()
   {
       super(myFrame);
   }
}
Avatar of jpp1jpp1

ASKER

Dunno why it performs choppy at 1.4.

I use doubleBuffers for the frame drawing.
As far as I know 1.4 and later have in-built double buffering.
You might drop your solution, because I smell AWT<->SWING interferences (heavy weight vs. light weight).
Thanks for the points.
<*>