Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


creating a ms-paint application

Posted on 2003-03-20
Medium Priority
Last Modified: 2010-04-17
how to create a ms-paint application in jvava,which helps in creating various shapes on drag of the mouse sth similar to the paint application.
Question by:javtech23
  • 2

Author Comment

ID: 8178967
iam a naive to java so kindly tell me how to go abt it.
LVL 30

Accepted Solution

Mayank S earned 200 total points
ID: 8179101
You can start with an applet. Draw rectangles and fill them with colours using the fillRect () method. Also, draw a rectangle to be used as a drawing-sheet. Keep a mouse-listener and a mouse-motion-listener which will read the co-ordinates and when the user clicks on one of the rectangles, the colour should be set. Also, when the user clicks and drags the mouse in the drawing-sheet, then keep reading the previous and current x and y positions of the mouse and drawing a line (in the currently selected colour) between those locations.


Expert Comment

ID: 9446932
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 30

Expert Comment

by:Mayank S
ID: 9471985
Recommendation: Accept mayankeagle's comment as answer.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Introduction to Processes
Starting up a Project

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question