在JBUILDER2006下运行下面的代码..为什么画面不会自动显示出来?要点下全屏或拉下边框才能显示...
还有..为什么在点jButton3时.响应的动作会分两步执行??
谢谢!!
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
public class test2 extends JFrame {
public test2() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static void main(String[] args) {
test2 test2 = new test2();
}
private void jbInit() throws Exception {
this.getContentPane().setLayout(xYLayout1);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
show();
setSize(800, 600);
jButton1.setText( "jButton1 ");
jButton1.addActionListener(new test2_jButton1_actionAdapter(this));
jButton1.addMouseListener(new test2_jButton1_mouseAdapter(this));
jButton3.addMouseListener(new test2_jButton3_mouseAdapter(this));
jButton3.addActionListener(new test2_jButton3_actionAdapter(this));
this.getContentPane().add(jButton1, new XYConstraints(5, 68, 138, 56));
jButton4.setText( "jButton4 ");
jButton3.setText( "jButton3 ");
this.getContentPane().add(jButton2, new XYConstraints(5, 143, 98, 31));
this.getContentPane().add(jButton3, new XYConstraints(5, 192, 135, 53));
this.getContentPane().add(jButton4, new XYConstraints(5, 260, 96, 26));
jButton2.setText( "jButton2 ");
jButton4.setVisible(false);
}
XYLayout xYLayout1 = new XYLayout();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();