G
gajo
Hello!
I'm an absolute newbie when it comes to 2D graphics in Java. I have
downloaded an e-book about the subject, but I thought I could get a head
start if I post my question here. I did use graphics in Delphi, but it seems
to me that Java implements these things in an entirely different way.
So here's my problem: Let's say I have a simple form, and I draw a circle on
it. Nothing special, an empty circle, allthough I could perhaps fill it with
yellow Now, what I want to do is that when I click on the circle's
interior with the mouse, I can drag it around in the form. How can I do
this?
Do I need to make a new component that will have certain attributes, and in
the constructor I set the radius, then I set the mouse event to drag the
component and finally make it visible - OR there's already something like
this made in Java?
Thanks, Gajo
I'm an absolute newbie when it comes to 2D graphics in Java. I have
downloaded an e-book about the subject, but I thought I could get a head
start if I post my question here. I did use graphics in Delphi, but it seems
to me that Java implements these things in an entirely different way.
So here's my problem: Let's say I have a simple form, and I draw a circle on
it. Nothing special, an empty circle, allthough I could perhaps fill it with
yellow Now, what I want to do is that when I click on the circle's
interior with the mouse, I can drag it around in the form. How can I do
this?
Do I need to make a new component that will have certain attributes, and in
the constructor I set the radius, then I set the mouse event to drag the
component and finally make it visible - OR there's already something like
this made in Java?
Thanks, Gajo