• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JFrame without titlebar

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
can someone tell me of a method with which i can have a Jframe without a titlebar...
thanx
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fardeen,
I think u should use JWindow instead of JFrame which does not have any title bar.

regards
Deekasha
 
Fardeen Siddiqui
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 desktop..is there any other way out
thanx
fardeen
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fardeen,

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 :



parul,

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...

-Nate
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just when u create ur frame, on its init method, use this:
 
Crusading Chameleon likes the size of this ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic