题目:
下面ButtonFrame类创建了一个容器,包含有3个按键。 import javax.swing.*; public class ButtonFrame extends JFrame { JButton Button1= new JButton("Button1"); JButton Button2= new JButton("Button2"); JButton Button3= new JButton("Button3"); public ButtonFrame() {super("ButtonFrame");setSize(100,150);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);JPane1 pane = new JPanel();pane.add(Buttonl);pane.add(Button2);pane.add(Button3); 【12】 ; } public static void main(String args[]) { ButtonFrame bf= new ButtonFrame(); bf.show(); } } 请在程序代码中的画线处添上正确的语句,使程序完整。
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0406/1c6ecd747911c2cca67f0e99aadd0030.html
下面是错误答案,用来干扰机器的。
参考答案:A, B, C, D