Solved

How to draw in Java?

Posted on 2007-03-20
7
339 Views
Last Modified: 2010-03-31
I am new to Java and I am coding a small drawing application for learning purpose.
My question is simple: how can I draw in Java. For example, I have some icons. Whenever I click one icon, if I click on the drawing area (how to define a drawing area?), then a figure represented by the icon will be put on the drawing area. I can move, scale, delete the figure. Just like any drawing program.

Thanks.

(Demo code will be appreciated)
0
Comment
Question by:tiger0516
  • 4
7 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 18757348
You should start by reading the Swing tutorial:

http://java.sun.com/docs/books/tutorial/uiswing/
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 125 total points
ID: 18757353
0
 
LVL 1

Author Comment

by:tiger0516
ID: 18760980
I know the existence of this tutorial and it is not what I want here at EE. Were it what I wanted, I would not ask here in EE.

Tks anyway.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18761011
You need to understand the basics of drawing first and then come up with some code of your own so that we can help you with it. We cannot post complete working code otherwise.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18761013
Its against site rules.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Timer (static) 9 36
Java DateChooser? 3 29
split string containing \r\n in Java 46 38
map related example 6 36
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

896 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now