File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JFrame without titlebar 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 without titlebar" Watch "JFrame without titlebar" New topic

JFrame without titlebar

Fardeen Siddiqui

Joined: Dec 08, 2000
Posts: 21
Hi all,
can someone tell me of a method with which i can have a Jframe without a titlebar...
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi fardeen,
I think u should use JWindow instead of JFrame which does not have any title bar.

Fardeen Siddiqui

Joined: Dec 08, 2000
Posts: 21
Hi Deekasha,
if i use JWindow then it becomes static on the left top coner and i am not able to move it on the screen..i am making a ticker which should be able to move all over the there any other way out
parul patidar
Ranch Hand

Joined: Sep 07, 2001
Posts: 53
hi deekasha (did i typed correct?)
i am using free java ide when i run mu prog it shows winow without titlebar over process window of ide but when i switch between tasks it disappears y is it not persistent
please guide
thanx in advance
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121


Since the window doesn't have a titlebar, there is no built in way to move it ( try it on a normal window... the only place you can grab a regular window to move it is the title bar... ) so you have to program in your own code to move the window... something like the following should suffice :


What OS are you running on? I am using Windows NT and the window doesn't disappear when I switch processes... it doesn't have a box on the taskbar ( since it doesn't have a titlebar it isn't a full-fledged window... ), but if you use alt-tab, you will be able to switch back to it...

Also... depending on the IDE, your class may be running inside the IDE process if you launch it from the IDE... try running your class from DOS to see if this is still a problem.

And, before asking if we can make the window always be on top... No... sorry... You can't make a system level modal window in java... only an application level modal window...


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Carlos Cuevas

Joined: Sep 26, 2002
Posts: 9
just when u create ur frame, on its init method, use this:
I agree. Here's the link:
subject: JFrame without titlebar
It's not a secret anymore!