// ========================================================================== // $Id: $ // LabelTest // ========================================================================== // Copyright (C) 2003 Yamauchi, Hitoshi // // Max-Planck-Institut fuer Informatik AG4 // Stuhlsatzenhausweg 85, 66123 Saarbruecken // http://www.mpi-sb.mpg.de/ // // This software can be redistributed only under GNU copyleft. // // @author Yamauchi Hitoshi 山内 斉 // ========================================================================== // $Revision: $ // $Date: $ // $Author: $ // ========================================================================== import java.applet.*; import java.awt.*; import javax.swing.*; import com.sun.j3d.utils.applet.MainFrame; /** * LabelTest : test for sharing a code both as an applet and as an * application */ public class LabelTest extends JApplet { /** * initialize */ public void init() { JLabel label = new JLabel( "

This is how to write a code which can run both " + "as an applet and " + "as an application.

" + "

Did you know that you can write a html code into your text?

" + "" + ""); this.getContentPane().add(label); } /** * application main */ public static void main(String[] args) { LabelTest lt = new LabelTest(); Frame frame = new MainFrame(lt, 512, 512); } }