• Post Reply Bookmark Topic Watch Topic
  • New Topic

To remove close button form Jdialog?  RSS feed

 
Raji Raj
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDialog.setDefaultLookAndFeelDecorated(true);

Then i have got all the components and tried to remove.but still its not working.


public void removeMinMaxClose(Component comp)
{

System.out.println("inside"+ comp);
if(comp instanceof AbstractButton)
{
System.out.println("inside22"+ comp);
comp.getParent().remove(comp);

}
if(comp instanceof JButton)
{
System.out.println("inside22"+ comp);
comp.getParent().remove(comp);

}
if (comp instanceof Container)
{

Component[] comps = ((Container)comp).getComponents();
for(int x = 0, y = comps.length; x < y; x++)
{
System.out.println("container"+comps[x].getName());

removeMinMaxClose(comps[x]);
}
}
}

I have tried the above which i got from forum.Anyone please help.

Thanks
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

Use code tags to post codes.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!