1.一个只有一个lable的界面
import javax.swing.JFrame; import javax.swing.JLabel; public class reading extends JFrame { public static void main(String[] args) { new reading(); } reading() { JLabel jlbHelloWorld = new JLabel("Hello World"); add(jlbHelloWorld); this.setSize(100, 100); setVisible(true); } }http://www.javabeginner.com/java-swing/java-swing-tutorial