Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Titlebar in swing  RSS feed

 
Felix Devasia
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me how I could get rid of the default titlebar of the frame while running swing applications? Also, can I change the default icin of the "teacup", in the upperleft corner of the titlebar?
thanks..
 
mick barry
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the title bar, think it might be handle by the window manager of the OS so you could be limited to what you can do.
To change the icon, use setIconImage method in the Frame class.
 
ming fan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want the title bar, use Window instead, but you can't set icon on that either.
Originally posted by Felix Devasia:
Hi,
Can anyone tell me how I could get rid of the default titlebar of the frame while running swing applications? Also, can I change the default icin of the "teacup", in the upperleft corner of the titlebar?
thanks..

 
panyam km
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.,
JFrame fr = new JFrame();
use fr.setIconImage(new Image());
this will help
panyam
------------------
 
Ana Mihailescu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and also:

fr.SetTitle("your title"), inherited from java.awt.Frame
:-)
 
Carlos Cuevas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to get rid of title bar:
just when u create ur frame, on its init method, use this:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!