Results 1 to 3 of 3
  1. #1
    thorobred is offline Member
    Join Date
    Feb 2011
    Posts
    33
    Rep Power
    0

    Default Trying to get a picture drawn on java

    I'm having trouble inputting a picture on java, the code is:
    Java Code:
    import java.awt.Color;
    import java.awt.Graphics;
    public class Paint {
    
    	public void piant(Graphics page)
    	{
    		
    		page.setColor(Color.blue);
    		page.fillRect(50,50,100,100);
    		page.setColor(Color.white);
    		page.drawLine(50,50,150,150);
    		page.drawLine(50,150,150,50);
    	}
    }

  2. #2
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    What do you mean "trouble"? Do you receive error message?

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Java Picture Processor: PGM files and Arrays
    By snow_mac in forum New To Java
    Replies: 0
    Last Post: 11-30-2010, 02:16 PM
  2. how to send picture message sms using smpp in java
    By manishsuvasiya in forum Advanced Java
    Replies: 2
    Last Post: 11-22-2010, 06:34 AM
  3. how to send picture message using smpp in java
    By manishsuvasiya in forum New To Java
    Replies: 1
    Last Post: 11-16-2010, 06:25 AM
  4. Canvas not being drawn
    By tacosc in forum Java Applets
    Replies: 4
    Last Post: 03-29-2009, 11:11 AM
  5. Importing Picture into Java Code
    By swimmy101 in forum New To Java
    Replies: 1
    Last Post: 02-12-2009, 09:48 AM

Posting Permissions

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