jbinit是在父类构找函数里面被调用的。这个时候子类中的 JButton jb_Install = new JButton("Start Install");
JButton jb_Exit = new JButton("Exit");
JPanel jp_panel = new JPanel();
FlowLayout flowLayout1 = new FlowLayout();还没有得到执行。所以才会出现你说的那种问题。
JButton jb_Exit = new JButton("Exit");
JPanel jp_panel = new JPanel();
FlowLayout flowLayout1 = new FlowLayout();还没有得到执行。所以才会出现你说的那种问题。
我现在是在jbinit中实例化jb_Install等。但我感觉jb_Install的作用域是在ServerInstallFrame内,在jbinit中实例化jb_Install是不是不好?是不是设计思路就有问题?