各位好,我在myeclipse中加入了WindowBuilder插件,新建一个JFrame,然后改成“绝对布局”,添加控件。
我发现如果添加JtextField控件,那么添加后,就直接生成代码
private JTextField textField;
但是如果添加Jbutton控件,那么生成的代码是
JButton btnNewButton = new JButton("New button");
难道不能自动生成
private JButton btnNewButton;吗?
当然我可以自己手动改,不过为什么添加这两个控件不能都自动定义为private呢?
先谢谢了。
