Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes how to create a new minimize/restore/close button on a undecorated frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to create a new minimize/restore/close button on a undecorated frame" Watch "how to create a new minimize/restore/close button on a undecorated frame" New topic
Author

how to create a new minimize/restore/close button on a undecorated frame

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
hi there.

i just want to ask. how to do this.

i have a frame. (undecorated)
i made it undecorated because it will act as a splash screen.
but now, i want to make its own minimize/restore/close button on it.

any idea?

thanks.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

Make it decorated?

If you are using 1.6, java has a built in SplashScreen class. For previous versions you can use a JWindow and override the paintComponent to draw a background image on it.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
Maneesh Godbole wrote:Make it decorated?

If you are using 1.6, java has a built in SplashScreen class. For previous versions you can use a JWindow and override the paintComponent to draw a background image on it.


im on 1.6.

thanks. i will try to work this out.
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
i mean, how to do it like this...



i did tried to make it but this shows up.



any idea to make it blend with the image?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> any idea to make it blend with the image?

transparency?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Search on my recent posts in this forum; I explained to someone else how to minimize / restore just a week or so ago. Maximizing is similar.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

Do I understand you correctly that you wish to add this functionality on the splash screen?
If yes, then that is extremely bad usability.

Splash screens are meant to keep the user "occupied" till the application loads. They might also be used for advertisement or providing the user a feedback on the initializing activity if required. Splash screens typically only last (should) a few seconds.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a new minimize/restore/close button on a undecorated frame