Results 1 to 1 of 1
  1. #1
    ATB
    ATB is offline Member
    Join Date
    Mar 2014
    Posts
    6
    Rep Power
    0

    Default Creating a cube applet

    Java Code:
    package assignment7;
    
    import java.awt.*;
    
    public class Exercise5 
    {
    	public void paint(Graphics g)
    	{
    		g.drawRect(30, 50, 50, 50); 
    		g.drawLine(30,50,40,40); 
    		g.drawLine(80,50,90,40); 
    		g.drawLine(40,40,90,40); 
    		g.drawLine(80,100,90,90); 
    		g.drawLine(90,40,90,90);
    	}
    	public static void main(String args[])
    	{
    	
    	}
    }
    i got how to create the cube, but how do i loop the drawline?
    i am supposed to only have one ?
    Last edited by ATB; 03-17-2014 at 03:46 AM.

Similar Threads

  1. Bisection Method to find Square and Cube Roots
    By tecnicamente in forum New To Java
    Replies: 2
    Last Post: 05-07-2011, 01:03 AM
  2. 3d cube/shapes program
    By adamrain in forum New To Java
    Replies: 9
    Last Post: 01-05-2010, 05:17 PM
  3. Cube
    By Evil Smurf in forum Advanced Java
    Replies: 0
    Last Post: 08-30-2009, 06:22 PM
  4. Computing a cube (power of 3).
    By Jary316 in forum New To Java
    Replies: 4
    Last Post: 01-16-2009, 09:13 PM
  5. Rubiks Cube Solver
    By sufs2000 in forum Advanced Java
    Replies: 0
    Last Post: 06-03-2008, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •