java jframe 中 同一个按钮是不是不可以多次添加
比如:
JButton j1=new JButton ();
jframe .add(j1);
jframe .add(j1);
jframe .add(j1);显示的都是一个按钮,为什么呢?
比如:
JButton j1=new JButton ();
jframe .add(j1);
jframe .add(j1);
jframe .add(j1);显示的都是一个按钮,为什么呢?
JButton j2=j1;
这样行吗?
JButton jb1 = new JButton(action1);
JButton jb2 = new JButton(action1);
JButton jb3 = new JButton(action1);