填空题

下列JApplet实现了一个不可编辑的JTextArea和一个JButton。请填写正确的程序代码。 import javax.swing.*; import java.awt.*; public class Test17 extends JApplet { JTextArea jta; public void init() { Container cp = getContentPane(); cp.setLayout( new GridLayout(2,1)); jta = new JTextArea(30,30); jta.setEditable( true); 【15】 jta.setText("你好"); JButton jb = new JButton ("ok"); cp.add(jB) ; } }

【参考答案】

cp.add(jtA)