import java.awt.*;
import javax.swing.*;
public class JFO extends JFrame
{
private JTextField t1;
public JT(JPanel p) //文本框方法 ---------这里提示该方法无返回类型。。。求改!!
{
t1 = new JTextField("Java程序");
p.add(t1);
}
public JFO(String s) //窗体方法
{
setBounds(200,200,500,400);
setVisible(true);
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e){}
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main (String[] args)
{
JFO d =new JFO ("清除窗口"); / /加窗体
JT a =new JT(); //加文本框
}
}