Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package RamieRobota;
- import java.applet.Applet;
- import java.awt.*;
- import java.awt.event.*;
- import com.sun.j3d.utils.applet.MainFrame;
- import com.sun.j3d.utils.behaviors.vp.OrbitBehavior;
- import com.sun.j3d.utils.geometry.Box;
- import com.sun.j3d.utils.geometry.Cylinder;
- import com.sun.j3d.utils.geometry.Sphere;
- import com.sun.j3d.utils.universe.*;
- import javax.media.j3d.*;
- import javax.vecmath.*;
- import com.sun.j3d.utils.image.TextureLoader;
- import static java.lang.Math.cos;
- import static java.lang.Math.sin;
- public class Ramie_Robota extends Applet implements KeyListener {
- private TransformGroup objTrans2;
- private TransformGroup objTrans3;
- private TransformGroup objTrans4;
- private TransformGroup objTrans5;
- private TransformGroup objTrans6;
- private Transform3D pos3 = new Transform3D();
- private Transform3D p_chwytak = new Transform3D();
- private Transform3D p_chwytak1 = new Transform3D();
- private Transform3D p_chwytak2 = new Transform3D();
- private Transform3D obrot = new Transform3D();
- private Matrix4d macierz = new Matrix4d();
- private Matrix4d macierz2 = new Matrix4d();
- private float xloc=0.2f;
- private float yloc=0.0f;
- private float kat=0.0f;
- private float kx=0.0f;
- public BranchGroup createSceneGraph() {
- BranchGroup objRoot = new BranchGroup();
- //stojak
- Appearance wygladCylindra = new Appearance();
- wygladCylindra.setColoringAttributes(new ColoringAttributes(0.5f,0.5f,0.9f,ColoringAttributes.NICEST));
- Cylinder cylinder = new Cylinder(0.1f, 0.9f,Cylinder.GENERATE_NORMALS| Cylinder.GENERATE_TEXTURE_COORDS, wygladCylindra);
- objTrans2 = new TransformGroup();
- objTrans2.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- Transform3D pos2 = new Transform3D();
- pos2.setTranslation(new Vector3f(0.0f,0.0f,0.0f));
- objTrans2.setTransform(pos2);
- objTrans2.addChild(cylinder);
- objRoot.addChild(objTrans2);
- //podstawa
- Appearance wygladRamie = new Appearance();
- wygladRamie.setColoringAttributes(new ColoringAttributes(0.5f,0.9f,0.5f,ColoringAttributes.NICEST));
- Box ramie = new Box(0.3f, 0.1f, 0.1f,Cylinder.GENERATE_NORMALS| Cylinder.GENERATE_TEXTURE_COORDS, wygladRamie);
- objTrans3 = new TransformGroup();
- objTrans3.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- pos3.set(new Vector3f(0.1f,0.0f,0.0f));
- objTrans3.setTransform(pos3);
- objTrans3.addChild(ramie);
- objRoot.addChild(objTrans3);
- // ramie chwytaka wysowane
- Appearance wygladChwytak = new Appearance();
- wygladChwytak.setColoringAttributes(new ColoringAttributes(0.9f,0.5f,0.5f,ColoringAttributes.NICEST));
- Box chwytak = new Box(0.3f, 0.05f, 0.05f,Cylinder.GENERATE_NORMALS| Cylinder.GENERATE_TEXTURE_COORDS, wygladChwytak);
- objTrans4= new TransformGroup();
- objTrans4.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- p_chwytak.set(new Vector3f(0.2f,0.0f,0.0f));
- objTrans4.setTransform(p_chwytak);
- objTrans4.addChild(chwytak);
- objRoot.addChild(objTrans4);
- // palce chwytaka czesc pierwsza (gorna)
- Box chwytak1 = new Box(0.05f, 0.025f, 0.04f,Cylinder.GENERATE_NORMALS| Cylinder.GENERATE_TEXTURE_COORDS, wygladChwytak);
- objTrans5 = new TransformGroup();
- objTrans5.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- p_chwytak1.set(new Vector3f(0.5f,0.05f,0.0f));
- objTrans5.setTransform(p_chwytak1);
- objTrans5.addChild(chwytak1);
- objRoot.addChild(objTrans5);
- // palce chwytaka czesc druga(dolna)
- Box chwytak2 = new Box(0.05f, 0.025f, 0.04f,Cylinder.GENERATE_NORMALS| Cylinder.GENERATE_TEXTURE_COORDS, wygladChwytak);
- objTrans6 = new TransformGroup();
- objTrans6.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
- p_chwytak2.set(new Vector3f(0.5f,-0.05f,0.0f));
- objTrans6.setTransform(p_chwytak2);
- objTrans6.addChild(chwytak2);
- objRoot.addChild(objTrans6);
- // podloga i sciany
- int i;
- Point3f[] wspolrzedne = new Point3f[4];
- Point2f[] tex_coords = new Point2f[4];
- for(i = 0; i< 4; i++){
- wspolrzedne[i] = new Point3f();
- tex_coords[i] = new Point2f();
- }
- wspolrzedne[0].y = -0.45f;
- wspolrzedne[1].y = -0.45f;
- wspolrzedne[2].y = -0.45f;
- wspolrzedne[3].y = -0.45f;
- wspolrzedne[0].x = 1.5f;
- wspolrzedne[1].x = 1.5f;
- wspolrzedne[2].x = -1.5f;
- wspolrzedne[3].x = -1.5f;
- wspolrzedne[0].z = 1.5f;
- wspolrzedne[1].z = -1.5f;
- wspolrzedne[2].z = -1.5f;
- wspolrzedne[3].z = 1.5f;
- // tekstury
- tex_coords[0].x = 0.0f;
- tex_coords[0].y = 0.0f;
- tex_coords[1].x = 1.0f;
- tex_coords[1].y = 0.0f;
- tex_coords[2].x = 0.0f;
- tex_coords[2].y = 1.0f;
- tex_coords[3].x = 1.0f;
- tex_coords[3].y = 1.0f;
- Appearance wyglad_ziemii = new Appearance();
- QuadArray podloga = new QuadArray(4, GeometryArray.COORDINATES|GeometryArray.TEXTURE_COORDINATE_2);
- podloga.setCoordinates(0,wspolrzedne);
- podloga.setTextureCoordinates(0, tex_coords);
- Shape3D podstawka = new Shape3D(podloga);
- Shape3D podstawka2 = new Shape3D(podloga);
- podstawka2.setAppearance(wyglad_ziemii);
- Transform3D p_ziemia = new Transform3D();
- p_ziemia.set(new Vector3f(0.0f,-0.9501f,0.0f));
- Transform3D tmp_rot = new Transform3D();
- tmp_rot.rotZ(Math.PI);
- p_ziemia.mul(tmp_rot);
- TransformGroup transformacja_c = new TransformGroup(p_ziemia);
- transformacja_c.addChild(podstawka2);
- objRoot.addChild(podstawka);
- objRoot.addChild(transformacja_c);
- podstawka.setAppearance(wyglad_ziemii);
- // tlo z boxa
- Appearance wygladtla = new Appearance();
- Sphere tlo = new Sphere(10f,Sphere.GENERATE_NORMALS_INWARD|Sphere.GENERATE_TEXTURE_COORDS ,200, wygladtla);
- objRoot.addChild(tlo);
- BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
- Color3f light1Color = new Color3f(1.0f, 0.0f, 0.2f);
- Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);
- DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
- light1.setInfluencingBounds(bounds);
- objRoot.addChild(light1);
- Color3f ambientColor = new Color3f(0.0f, 0.0f, 1.0f);
- AmbientLight ambientLightNode = new AmbientLight(ambientColor);
- ambientLightNode.setInfluencingBounds(bounds);
- objRoot.addChild(ambientLightNode);
- TextureLoader loader = new TextureLoader("robot.jpg",null); // tekstura robota
- TextureLoader loader1 = new TextureLoader("material1.jpg",null); // tekstura tla
- TextureLoader loader2 = new TextureLoader("podloga.tif",null); // tekstura podlogi
- ImageComponent2D image = loader.getImage();
- ImageComponent2D image1 = loader1.getImage();
- ImageComponent2D image2 = loader2.getImage();
- Texture2D robot = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,image.getWidth(), image.getHeight());
- Texture2D material1 = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,image1.getWidth(), image1.getHeight());
- Texture2D material2 = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,image2.getWidth(), image2.getHeight());
- robot.setImage(0, image);
- robot.setBoundaryModeS(Texture.WRAP);
- robot.setBoundaryModeT(Texture.WRAP);
- material1.setImage(0, image1);
- material1.setBoundaryModeS(Texture.WRAP);
- material1.setBoundaryModeT(Texture.WRAP);
- material2.setImage(0, image2);
- material2.setBoundaryModeS(Texture.WRAP);
- material2.setBoundaryModeT(Texture.WRAP);
- wygladCylindra.setTexture(robot); // robot
- wygladRamie.setTexture(robot); // robot
- wygladChwytak.setTexture(robot); // robot
- wyglad_ziemii.setTexture(material2); // podloga
- wygladtla.setTexture(material1); // tlo
- return objRoot;
- }
- public Ramie_Robota() {
- setLayout(new BorderLayout());
- GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
- Canvas3D c = new Canvas3D(config);
- add("Center", c);
- c.addKeyListener(this);
- BranchGroup scene = createSceneGraph();
- SimpleUniverse u = new SimpleUniverse(c);
- Transform3D przesuniecie_obserwatora = new Transform3D(); // to dodaje obserwatora
- przesuniecie_obserwatora.set(new Vector3f(0.0f,0.4f,4.0f));
- u.getViewingPlatform().getViewPlatformTransform().setTransform(przesuniecie_obserwatora);
- OrbitBehavior orbit = new OrbitBehavior(c,
- OrbitBehavior.REVERSE_ROTATE);
- orbit.setSchedulingBounds(new BoundingSphere());
- u.getViewingPlatform().setViewPlatformBehavior(orbit);
- u.addBranchGraph(scene);
- }
- public void keyPressed(KeyEvent e) {
- if (e.getKeyChar()=='d'){
- if(xloc<0.69)
- xloc=xloc+0.01f;
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.get(macierz2);
- macierz2.m03=(xloc)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-xloc*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.get(macierz);
- p_chwytak.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13,macierz2.m23+macierz.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.get(macierz2);
- macierz2.m03=(xloc+0.3f)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-(xloc+0.3f)*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.get(macierz);
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13+0.05f,macierz2.m23+macierz.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.get(macierz2);
- macierz2.m03=(xloc+0.3f)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-(xloc+0.3f)*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.get(macierz);
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13-0.05f,macierz2.m23+macierz.m23));
- objTrans6.setTransform(p_chwytak2);
- }
- if (e.getKeyChar()=='a') {
- if(xloc>0.2)
- xloc=xloc-0.01f;
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.get(macierz2);
- macierz2.m03=(xloc)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-xloc*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.get(macierz);
- p_chwytak.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13,macierz2.m23+macierz.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.get(macierz2);
- macierz2.m03=(xloc+0.3f)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-(xloc+0.3f)*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.get(macierz);
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13+0.05f,macierz2.m23+macierz.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.get(macierz2);
- macierz2.m03=(xloc+0.3f)*cos(kx)+macierz2.m23*sin(kx);
- macierz2.m13=yloc;
- macierz2.m23=(-(xloc+0.3f)*sin(kx))+macierz2.m23*cos(kx);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.get(macierz);
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13-0.05f,macierz2.m23+macierz.m23));
- objTrans6.setTransform(p_chwytak2);
- }
- if (e.getKeyChar()=='w'){
- if(yloc<0.25)
- yloc=yloc+0.01f;
- kat=0;
- p_chwytak.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03,macierz2.m13+0.05f,macierz2.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03,macierz2.m13-0.05f,macierz2.m23));
- objTrans6.setTransform(p_chwytak2);
- pos3.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- pos3.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- pos3.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans3.setTransform(pos3);
- }
- if (e.getKeyChar()=='s') {
- if(yloc>-0.3)
- yloc=yloc-0.01f;
- kat=0;
- p_chwytak.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.get(macierz);
- p_chwytak.setTranslation(new Vector3d(macierz2.m03+macierz.m03,macierz2.m13+macierz.m13,macierz2.m23+macierz.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03,macierz2.m13+0.05f,macierz2.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03,macierz2.m13-0.05f,macierz2.m23));
- objTrans6.setTransform(p_chwytak2);
- pos3.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- pos3.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- pos3.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans3.setTransform(pos3);
- }
- if (e.getKeyChar()=='e') {
- kat=(float) (Math.PI/32);
- kx=(float) (kx+Math.PI/32);
- obrot.rotY(Math.PI/32);
- p_chwytak.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.mul(obrot);
- p_chwytak.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.mul(obrot);
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03,macierz2.m13+0.05f,macierz2.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.mul(obrot);
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03,macierz2.m13-0.05f,macierz2.m23));
- objTrans6.setTransform(p_chwytak2);
- pos3.get(macierz);
- macierz2.m03=macierz.m03*cos(kat)+macierz.m23*sin(kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(kat)+macierz.m23*cos(kat);
- pos3.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- pos3.mul(obrot);
- pos3.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans3.setTransform(pos3);
- }
- if (e.getKeyChar()=='q') {
- kat=(float) (Math.PI/32);
- kx=(float) (kx-Math.PI/32);
- obrot.rotY(-kat);
- p_chwytak.get(macierz);
- macierz2.m03=macierz.m03*cos(-kat)+macierz.m23*sin(-kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(-kat)+macierz.m23*cos(-kat);
- p_chwytak.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak.mul(obrot);
- p_chwytak.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans4.setTransform(p_chwytak);
- p_chwytak1.get(macierz);
- macierz2.m03=macierz.m03*cos(-kat)+macierz.m23*sin(-kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(-kat)+macierz.m23*cos(-kat);
- p_chwytak1.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak1.mul(obrot);
- p_chwytak1.setTranslation(new Vector3d(macierz2.m03,macierz2.m13+0.05,macierz2.m23));
- objTrans5.setTransform(p_chwytak1);
- p_chwytak2.get(macierz);
- macierz2.m03=macierz.m03*cos(-kat)+macierz.m23*sin(-kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(-kat)+macierz.m23*cos(-kat);
- p_chwytak2.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- p_chwytak2.mul(obrot);
- p_chwytak2.setTranslation(new Vector3d(macierz2.m03,macierz2.m13-0.05,macierz2.m23));
- objTrans6.setTransform(p_chwytak2);
- pos3.get(macierz);
- macierz2.m03=macierz.m03*cos(-kat)+macierz.m23*sin(-kat);
- macierz2.m13=yloc;
- macierz2.m23=-macierz.m03*sin(-kat)+macierz.m23*cos(-kat);
- pos3.setTranslation(new Vector3d(0.0f,0.0f,0.0f));
- pos3.mul(obrot);
- pos3.setTranslation(new Vector3d(macierz2.m03,macierz2.m13,macierz2.m23));
- objTrans3.setTransform(pos3);
- }
- }
- public void keyReleased(KeyEvent e){
- // Invoked when a key has been released.
- }
- public void keyTyped(KeyEvent e){
- //Invoked when a key has been typed.
- }
- public static void main(String[] args) {
- System.out.println("Program Started");
- System.setProperty("sun.awt.noerasebackground", "true");
- Ramie_Robota robot = new Ramie_Robota();
- robot.addKeyListener(robot);
- MainFrame mf = new MainFrame(robot, 1000, 1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement