问题在下面备注部分
import java.awt.Container;import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Ku extends JFrame {
public Ku() {
super("talk");
Container c=this.getContentPane();
c.setLayout(new FlowLayout());
JLabel lbl=new JLabel("dialog");
c.add(lbl);
this.setSize(400, 500);
this.setVisible(true);
Ku k=new Ku(this,"对话框",false);/*这为什么会报错啊*/
k.setSize(100, 100);
k.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
new Ku();
}
}