java.sun.com里有帮助
jdk也有例子

解决方案 »

  1.   

    那些可视化控件在哪个包里啊?为什么我用
    mainFrame.add(JButton);
    总是出错:
    E:\Java\Java开发\Java2\Java2.java:35: cannot resolve symbol
    symbol  : variable JButton
      

  2.   

    终于加上去了!!!
    MMD,呵呵
    怎么这么麻烦啊?
      

  3.   

    JButton MyButton;
    MyButton = new JButton("Run");
    MyButton.addActionListener(this);  //为什么出错??
      

  4.   

    为什么通过
    JButton MyButton;
    MyButton = new JButton("Run");
    MyButton.addActionListener(this);
    MyButton.setBackground(Color.green);
    MyButton.setVisible(true);
    MyButton.setSize(100,50);
    mainFrame.add(MyButton);
    这样添加的按钮,开始不显示,要点以下窗体后才能显示呢?