Skip to main content

How to create Free Form JFrame

3 replies [Last post]
chavdar
Offline
Joined: 2007-03-29

Hello guys,

I want to create a free form(non rectangular) JFrame.
The background of the Frame will be an image.
The form of the frame should be something like map.
Also i want to put shade on it.
Can you tell me how to do this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
twalljava
Offline
Joined: 2004-07-26

There are some classes included with JNA (http://jna.dev.java.net) which allow you to apply a shape mask to any window which will give it a non-rectangular shape. There is also a web-startable demo at http://rabbit-hole.blogspot.com/2007/02/non-rectangular-windows-update.html.

Dmitri Trembovetski

Hello,

First, this is not the right forum to ask this - you need
to find AWT forum.

But anyway, unfortunately Java does not currently support
shaped toplevel windows. This is being planned for the next
release.

Thanks,
Dmitri

java2d@javadesktop.org wrote:
> Hello guys,
>
> I want to create a free form(non rectangular) JFrame.
> The background of the Frame will be an image.
> The form of the frame should be something like map.
> Also i want to put shade on it.
> Can you tell me how to do this?
> [Message sent by forum member 'chavdar' (chavdar)]
>
> http://forums.java.net/jive/thread.jspa?messageID=210480
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

chavdar
Offline
Joined: 2007-03-29

Thank you Dmitri !