Java 程序国际化教程+源码
源代码在线查看: class-schedule.java
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class class-schedule extends Frame {
public class-schedule() {
super("Java Training");
Image im = getToolkit().getImage(getClass().getResource("SMarea.gif"));
image-canvas ic = new image-canvas(im);
Panel p = new Panel(new GridLayout(3, 2));
p.add(new Label("Date: "));
p.add(new Label("6/3/98"));
p.add(new Label("Cost: " ));
p.add(new Label("$1,200.00"));
p.add(new Label("Location: " ));
p.add(new Label("San Mateo, CA"));
add(new Label("Training", Label.CENTER), BorderLayout.NORTH);
add(p, BorderLayout.SOUTH);
ScrollPane sp = new ScrollPane();
sp.add(ic);
add(sp, BorderLayout.CENTER);
setSize(300, 250);
}
public static void main(String[] args) {
Frame f = new class-schedule();
f.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
);
f.setVisible(true);
}
}