bored_shiva
asked on
Changing a Java Frame's close/min/max icons
I have an application that uses a JFrame as the main window for the app. I am using swing plaf to change certain things about how the frame looks and how the components look, for example:
String dLook = UIManager.getSystemLookAnd FeelClassN ame();
UIManager.put("ScrollBar.h ighlight", new ColorUIResource(255,0,0));
UIManager.put("TextPane.fo nt", new FontUIResource("Dialog", Font.PLAIN, 14));
UIManager.setLookAndFeel(d Look);
What I'd like to do is to change the default icons for close/minimize/maximize on my Frame/windowsTitle (I'm not sure which one am I actually referring to, but they are the ones at the top right of every window.) I saw a bunch of JInternalFrame properties to edit, but none for the overall frame (External frame?) I want to set the icons for things like close, close_pressed, and close_mouse_over to my own png images.
Thanks
String dLook = UIManager.getSystemLookAnd
UIManager.put("ScrollBar.h
UIManager.put("TextPane.fo
UIManager.setLookAndFeel(d
What I'd like to do is to change the default icons for close/minimize/maximize on my Frame/windowsTitle (I'm not sure which one am I actually referring to, but they are the ones at the top right of every window.) I saw a bunch of JInternalFrame properties to edit, but none for the overall frame (External frame?) I want to set the icons for things like close, close_pressed, and close_mouse_over to my own png images.
Thanks
ASKER
basav_com,
That solution lets you modify the frame icon (on the upper left) I want to modify the CLOSE, MIN, and MAX, icons, on the upper right.
I know this is possible, because I see skin engines like skinlf do it. The question is how to do it using the built-in Java tools.
Thanks
That solution lets you modify the frame icon (on the upper left) I want to modify the CLOSE, MIN, and MAX, icons, on the upper right.
I know this is possible, because I see skin engines like skinlf do it. The question is how to do it using the built-in Java tools.
Thanks
oops... I overlooked at your question :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thomas,
How do I go about creating my own WindowsBorder? I saw that JRootPane can specify different WindowsDecorationStyles that are built into it, but I was not able to find how to create my own style.
Thanks
How do I go about creating my own WindowsBorder? I saw that JRootPane can specify different WindowsDecorationStyles that are built into it, but I was not able to find how to create my own style.
Thanks
To create you own border, the way i recommend is overriding the paint method. Then you have a graphics object and have complete control over what to draw and where. If you have never overrided the paint method before i can post an example.
https://www.experts-exchange.com/questions/10238019/Form-Icons-JDialog-et-al-JDK1-2.html