setLocaiton问题
import java.awt.*;
import javax.swing.*;
public class Ttest extends JApplet {
JLabel lb;
Container c;
JPanel p;
JTextField txt_word;
public Ttest()
{
JLabel lb=new JLabel("AAA");
lb.setLocation(40,80);
add(lb);
}
}
为什么 lb.setLocation(40,80);写了和没写一样?控制不了标签的坐标,郁闷了!!