File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JFrame Title Block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame Title Block" Watch "JFrame Title Block" New topic
Author

JFrame Title Block

NILESH PATEL
Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Dear all,
Is it possible to make the title block of JFrame or JInternalFrame invisible. I am using JInternal Frame within a main JFrame. Please help how to remove this.
Thanks in advance
Nilesh
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi NILESH,
JFrame:
It depends on what version of JDK you have. In 1.4 their is a new method for JFrame:
setDecorations( false );
will do it for you.
JInternalFrame:
Create it without any parameter and you should get no title bar.
Regards,
Manfred.
NILESH PATEL
Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Thanks for your reply, two questions.
1) JDK 1.4 is still beta right?
2) Creating JInternal Frmae without parameter does not make any differance.
However I tried using JWindow, but my problem is this internal frame or JWindow is right side of the JSplitPane, and JSplitpane is added to Main Frame. So how can i add this component in sequence.
Thanks, I am still trying and I will let you know if I am successful.
Thanks
Nilesh
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
1.4 is out final release 2 weeks ago!
go to http://java.sun.com to d/l it.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Okay... first of all... the only frame like component you can add inside another frame is JInternalFrame. ( hence the name... )

Here's some code to generate a JInternalFrame that looks more like a JInternalWindow -



Unfortunately, like a real JWindow, there is no way to move or close the JInternalFrame, since the titlebar is missing... you'll have to figure out what you want to do to get those functions to work...

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
NILESH PATEL
Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Thanks very much
This works. It removes title block and is ok for now at least. However please let me know whether this is a new feature of 1.4 or still works with older jdsk and if yes since when. Our product does not support 1.4 at the moment.
Thanks very much again
Nilesh
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Nope... I'm developing in JDK 1.3.1... changing the UI renderer of the JInternalFrame should work for any version of Java that supports Swing...

-Nate
NILESH PATEL
Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Thanks Nathan and everyone for solving this. Great work.
See you again
Nilesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFrame Title Block