You are not logged in.

#1 2010-11-09 08:51:54

Thor@Flanders
Member
Registered: 2010-08-27
Posts: 266

[SOLVED]How do I drag shapes in Java?

Hi,

Easy enuff for the clever ones out there big_smile but still iludes me.

What would I have to accomplish to have a canvas in Java with some shapes/icons/images on to it that can be dragged around and left there (be rearranged) on that canvas?

The positions after this "excercise" would be read out and stored...

I'd set this up in Java as an applet.

Some pointers woild be nice...thanks in advance.

Wellness to all

Thor

Last edited by Thor@Flanders (2010-11-09 09:34:53)

Offline

#2 2010-11-09 09:19:21

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: [SOLVED]How do I drag shapes in Java?

I would think that you could easily figure it out once you understood how to handle mouse events.

Offline

#3 2010-11-09 09:34:37

Thor@Flanders
Member
Registered: 2010-08-27
Posts: 266

Re: [SOLVED]How do I drag shapes in Java?

Hi,

Gottit! I followed your pointer and "I have arrived" !

Thanks

It does involve mouse events, "remembering" locations before and after and redrawing shapes.

Thanks!

Thor

Offline

Board footer

Powered by FluxBB