• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to remove a title bar from a JFrame

 
Sunil Babu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i would like to know how to remove title bar from a JFrame
hope i get one answer
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunil,
You have asked a very frequently asked question
If you are using the latest java version (1.4), then you can use the "setUndecorated()" method (defined in class "java.awt.Frame" -- the superclass of "javax.swing.JFrame")
If you are not using version 1.4 (of java), then you cannot remove the title bar from a "JFrame" (sorry ). However, you may be able to use the "JWindow" class (instead of the "JFrame" class). I suggest you check the documentation to see if "JWindow" is suitable for your requirements.
Hope this helps you.
Good Luck,
Avi.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if I'm right, setUndecorated() method can be called only while the frame is not displayable.
Is it okay?
If you are looking at a solution for spalsh screen (as you posted in this thread), you can very well use JWindow class.
[ February 05, 2003: Message edited by: R Manivannan ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!