本帖最后由 yanjingrong 于 2011-05-01 22:36:02 编辑

解决方案 »

  1.   

    frame.setVisible(true);这一语句应该放在后面,界面必须设置好,才显示。
      

  2.   

    我感觉你还是参考我一下的代码吧,你的代码问题多多的。package day01;import javax.swing.*;public class Test {
    public static void main(String[] args) { JFrame frame = new JFrame();
    frame.setBounds(200, 100, 800, 500); // 窗口大小
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JScrollPane panel = new JScrollPane();
    JTextArea area = new JTextArea("123455");
    panel.getViewport().add(area); frame.add(panel);
    frame.setVisible(true);
    }
    }
      

  3.   

    oracle 还是 java啊,难道oracle这样也能写?第一次看到哦,惊喜