【单选题】要使程序的运行结果如下图所示,则下划线应填入的代码是 import java.awt.*;import javax.swing.*; import java.awt..*; public class Test{ public static void main(String[] args){ new FrameClass(); } } class FrameClass extends JF...
A.
blic FrameClass(){ JFrame jf = new JFrame("Swing组件实例"); jf.getContentPane().setLayout(null); jf.setSize(200,200); JTextArea text = new JTextArea(550,550); JScrollPane jp = new JScrollPane( ); jp.setBounds(10,10,150,100); jf.getContentPane().add(jp); jf. (true); }}
【单选题】import java.awt.*; import javax.swing.*; public class TryJFrame { public static void main(String agrs[]) { JFrame frame = new JFrame("JFrame应用举例"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)...
A.
JFrame frame = new JFrame("JFrame应用举例");
B.
JLabel label = new JLabel("JFrame应用举例",swingConstants.CENTER);