Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

icon picture

  Asked By: Darcy    Date: May 25    Category: Java    Views: 716
  

how can change the icon picture in form toolbar?
and can delete the minimize or maximaize buttons?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Dot net Sachin     Answered On: May 25

if you want to remove the maximize and minimize  button from your form  
-public void setResizable(boolean b)- i think this method is ganna help you.
try it

 
Answer #2    Answered By: Renee Lane     Answered On: May 25

By default Swing uses the native window decorations, and I've tried to make a change  in native decoration in different ways but I found out it is a native service, so I referred to another way, it sounds more logical, because if you are going to make change on window decoration, it must been applied in all platforms, so I tried to find a way to set the window decorations the current LookAndFeel (It doesn't work for System LookAnd Feel as I said before)
and write this code before you create or show your main JFrame,

JFrame.setDefaultLookAndFeelDecorated(true)

please read its comment carefully, after that you can do whatever you are looking for by defining your own theme, See the OcceanTheme source code and read some books about
defining a new look and feel.

To remove the default decoration buttons  such as Minimize, Maximize and Close buttons, as Babak said, there are some properties in JFrame, JDialog or JInternalFrame, such as setResizable

 
Didn't find what you were looking for? Find more on icon picture Or get search suggestion and latest updates.




Tagged: