Important alert: (current site time 7/15/2013 3:20:14 PM EDT)
 

winzip icon

A Simple JAVA Painter

Email
Submitted on: 3/14/2004 1:46:38 AM
By: Hendra Gunawan 
Level: Beginner
User Rating: By 8 Users
Compatibility: Java (JDK 1.1), Java (JDK 1.2)
Views: 34086
author picture
(About the author)
 
     Description: This is a simple Painter program using JAVA language. The program uses 4 classes to build the entire structure. Please compile using the JAVA SDK, and run the Painter.java as the main program. Program Ability: -Draw Line, FreeHand, Oval, Rectangle, Polygon, Round Rectangle, Filled Oval, Filled Rectangle, Filled Polygon, Filled Round Rectangle -Undo and Redo process. -Set Background Color & set Foreground Color. -Save canvas to file ( *.jpg ) -Open canvas from file PS: The program will save the canvas into 2 files, (*.jpg) and (*.*) You must open the (*.*) file in order to edit the picture you saved before.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/19/2004 5:27:49 AM

Hello! I can't download the source code of the Simple java painter.
When I start the download the page does not load! Thank you for helping me !
(If this comment was disrespectful, please report it.)

 
9/3/2004 4:00:49 AMHendra Gunawan

I think it's workin' fine here @@
(If this comment was disrespectful, please report it.)

 
4/9/2005 4:28:05 PM

this code is great to learn al about graphics in Java. Thanks a lot ;)
(If this comment was disrespectful, please report it.)

 
5/26/2005 7:23:57 AM

i tried to re-compile it with SDK 1.3 and the came up with this message :
Painter.java:136: cannot resolve symbol
symbol : variable WHITE
location: class java.awt.Color canvasPanel.setForeGroundColor(Color.WHITE);

dan

Painter.java:137: cannot resolve symbol
symbol : variable BLACK
location: class java.awt.Color
canvasPanel.setBackGroundColor(Color.BLACK);

would you like to explain how to overcome this problems? thanks a lot.
(If this comment was disrespectful, please report it.)

 
4/28/2006 1:07:16 PMharilal

realy great.there is no flickering and all.............
only prob is while trying to compile with older verions of jdk some errors are coming.......if threre is any solution other than jdk1.5 plz mail me

any way"U DID A GREAT JOB!!"
(If this comment was disrespectful, please report it.)

 
8/20/2008 12:13:41 PMvineet

ur project is so nice
(If this comment was disrespectful, please report it.)

 
8/20/2008 10:35:38 PMvineet

i am the student of mca please send me the code of the java paint project i need of this project
(If this comment was disrespectful, please report it.)

 
4/23/2010 2:55:03 PMvincent

hello your code is very good
but i want a textfield and i cannot see the tools in the toolbar like rectangle shape etc .please can you add a rectangular textfield in this program
thanking you
(If this comment was disrespectful, please report it.)

 
3/6/2011 8:33:49 AMvan

pls..can you send it to me this code? thanks!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.