import javax.swing.*;
public class TestLabel extends JFrame {
private JLabel l =new JLabel();
public TestLabel()
{
this.setSize(600,400);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
l.setText("Hello 中国");//设置Label的显示内容
this.add(l,"North");
this.setTitle("Label Test");
this.setVisible(true);
}
public static void main(String[] args) {
new TestLabel();
}
}
只知道Label可以用HTML,包含,可以解释。看看上面的代码。
不知道其他的控件怎么样!没去试过!
有呀,上色.