アットウィキロゴ

JAVA 51 51

import javax.media.j3d.*;
import com.sun.j3d.utils.universe.*;
import java.awt.*;
import javax.swing.*;
public class ex51
{
public static void main(String[] args)
{
  ex51 test = new ex51();
}
public ex51()
{
  JFrame frame = new JFrame();
  frame.setSize(500,500);
  frame.setTitle("ex51");
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  JPanel cp = new JPanel();
  cp.setLayout(null);
  frame.add(cp);
  GraphicsConfiguration g_config = SimpleUniverse.getPreferredConfiguration();
  Canvas3D canvas = new Canvas3D(g_config);
  canvas.setBounds(100,100,200,200);
  cp.add(canvas);
  SimpleUniverse universe = new SimpleUniverse(canvas);
  frame.setVisible(true);
}
}
最終更新:2010年01月06日 15:01