Hi
i wants to change this Property of the JFrame. my Code Doesnt work. can any one help me.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ChgDec extends JFrame implements ActionListener{
JButton b1;
JPanel p1;
public ChgDec(String title){
super(title);
p1 = new JPanel();
setContentPane(p1);
b1 = new JButton("Decorated true");
p1.add(b1);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent ae){
if (ae.getSource()==b1){
JFrame.setDefaultLookAndFeelDecorated(!isDefaultLookAndFeelDecorated());
System.out.println(isDefaultLookAndFeelDecorated());
}
}
public static void main(String args[]){
ChgDec c = new ChgDec("Swatian Tigers");
c.setDefaultCloseOperation(EXIT_ON_CLOSE);
c.setSize(300,200);
c.setVisible(true);
}
}