小程序有点小毛病
import java.awt.*;import javax.swing.*;
public class AritDemo
{
public static void main(String[] args)
{
AritFrame frame = new AritFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}
class AritFrame extends JFrame
{
private JLabel T;
public AritFrame()
{
setTitle("Arit Demo");
Container container=getContentPane();
container.setLayout(new FlowLayout());
T=new JLabel("Java,你好!");
T.getLocation(400,100);
Font f=new Font(T,Font.BOLD,32);
text.setFont(f);
container.add(T,BorderLayout.SOUTH);
setVisible(true);
pack();
setSize(450,150);
}
}