aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to change the shape of the JFrame to a custom look Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to change the shape of the JFrame to a custom look" Watch "How to change the shape of the JFrame to a custom look" New topic
Author

How to change the shape of the JFrame to a custom look

Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi guy,
In my swing application I need a custom Frame that has a different look and feel than the usual JFrame. I want to remove the title bar and minimize, maximize and close buttons and provide my own buttons. I do not want to modify the JFrame box shape. To start out I know I have to customize the JWindow class. If any one has done this kind of work before could you please guide me through the process, or if there is some third party tool that could provide such kind of ui customization will be a lot helpful for me.
Thanks in advance.


Suman Mummaneni
Bangalore
India
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I would be surprised if that were possible...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Randall Kippen
Greenhorn

Joined: Oct 18, 2005
Posts: 15
You could use the Frame.setUndecorated method. Then you could
add your own panel, with custom buttons, to the frame. You would
have to implement your own methods for resizing and moving the
frame.
Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi
Thanks for the post Randall. This is good start for me. Now I can define my own close, max and min buttons on the frame, instead of using the boring old windows style buttons. I have got the basic platform to work on. Need to define more customization for my JFrame.
Thanks once again.
Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi Ilja Preuss

you need to take a look at the Sun Java (TM) Studio Enterprise IDE.

 
jQuery in Action, 2nd edition
 
subject: How to change the shape of the JFrame to a custom look