PDA

View Full Version : Java GUI & user interactive shapes


Yakisoba
08-03-2006, 09:17 AM
I have been teaching myself java for the past couple of weeks, as mentioned in my other post in this forum I have some background in other languages.

For the most part I have been practicing small programs/classes that are run from command line and accept various parameters to perform a designated task. I am now switching my focus to simple GUI solutions…So far I have been able to create simple forms that can accept and store user entered data, as well as perform multiple actions through the use of buttons. No Problem.

Next I would like to work with drawing shapes and giving the user the ability to interact with them. This is where I’ve hit a wall.

This is probably very simple just not sure where to start (aside from “googling”). Basically all I am trying to do is:
-have a window pop-up with a rectangle in it.
-allow the user to move that rectangle anywhere within that window.

I have been searching the net but all the examples seem to go way above and beyond what I am after…

Just looking for something to get the ball rolling.

Can someone point me to some simple tutorials that perform the above, or provide some code?

Currently researching different packages that may be useful/required.

Any suggestions would be greatly appreciated.

Thanks,

Yakisoba

Yakisoba
08-03-2006, 09:46 AM
Just found a good site with some example code...

http://www.java2s.com/Code/Java/Event/MoveShapewithmouse.htm

any other suggestions are still appreciated.

Yak