Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame Title Block

 
NILESH PATEL
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.4 is out final release 2 weeks ago!
go to http://java.sun.com to d/l it.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
NILESH PATEL
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nathan and everyone for solving this. Great work.
See you again
Nilesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic