/* Java 対応バージョンチェック Ver 0.00 */ /* */ /* */ /* by Atsushi 1999/5/8 */ import java.applet.Applet; import java.awt.*; public class VersionCheck extends Applet { /* --- Field --- */ private String version; /* --- 初期化 --- */ public void init() { version=System.getProperty("java.version"); if (version.indexOf("1.1")!=-1) { try { Class.forName("java.awt.Cursor"); } catch (ClassNotFoundException e) { version+=" (1.0 AWT)"; } catch (SecurityException e) { version+=" (1.0 AWT)"; } } setBackground(Color.white); setLayout(new FlowLayout(FlowLayout.LEFT)); add(new Label("Version : "+version)); } /* --- Applet の動作 --- */ public void start() { } public void stop() { } /* --- 描画処理 --- */ public void update(Graphics g) { paint(g); } /* --- 終了処理 --- */ public void destroy() { removeAll(); } }