import java.applet.Applet; import java.awt.*; import com.sun.j3d.utils.universe.SimpleUniverse; import com.sun.j3d.utils.geometry.Text2D; import javax.media.j3d.*; import javax.vecmath.*; public class Kiri1 extends Applet { public Kiri1() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(SimpleUniverse.getPreferredConfiguration()); add(c, BorderLayout.CENTER); BranchGroup juur = new BranchGroup(); juur.addChild(new Text2D("Tervitus", new Color3f(Color.green), "Times", 55, Font.ITALIC)); juur.compile(); SimpleUniverse u = new SimpleUniverse(c); u.getViewingPlatform().setNominalViewingTransform(); u.addBranchGraph(juur); } public static void main(String[] args) { Frame f=new Frame("Kiri"); f.add(new Kiri1()); f.setSize(300, 300); f.setVisible(true); } }