不继承JFrame 如何使用setDefaultLookAndFeelDecorated(true) 的问题
package 练习;
import javax.swing.*;
public class F extends JFrame
{
JFrame f=new JFrame();
F()
{
f.setSize(300,200);
f.setDefaultCloseOperation(3);
f.setVisible(true);
}
public static void main(String[] args)
{
JFrame.setDefaultLookAndFeelDecorated(true);
new F();
}
}
我每次要使用JFrame.setDefaultLookAndFeelDecorated(true);时都要继承JFrame
如何不继承JFrame使用JFrame.setDefaultLookAndFeelDecorated(true);
请高手赐教
import javax.swing.*;
public class F extends JFrame
{
JFrame f=new JFrame();
F()
{
f.setSize(300,200);
f.setDefaultCloseOperation(3);
f.setVisible(true);
}
public static void main(String[] args)
{
JFrame.setDefaultLookAndFeelDecorated(true);
new F();
}
}
我每次要使用JFrame.setDefaultLookAndFeelDecorated(true);时都要继承JFrame
如何不继承JFrame使用JFrame.setDefaultLookAndFeelDecorated(true);
请高手赐教
...全文


Java SE
