Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Draggable "stuff", snaped on a table  RSS feed

 
Jean-Yves Tinevez
Greenhorn
Posts: 22
Eclipse IDE Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I have an idea that trots into my mind since a bit.

I would like to create a nice GUI, just for fun, that would allow the user to take and drag a kind of square icon (lets say 64x64) and to drop it on a table, which could embed 4 of these icons in X and Y.

The icon would be snapped on a grid, like the icon on the MacOs Desktop.

Since i am still a beginner, i have no idea about what component could fit these two needs (draggable icons and snapping grid). Could someone point me to the right docs or ideas?
Maybe someone already did this kind of things?

Thank you a lot.
jy

PS: no idea when the java 1.6 sdk will be released as stable on the mac os x?
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tutorial has a page on drag and drop Introduction to Drag and Drop and Data Transfer which contains a section Data Transfer with a Custom Component which has an example like this: DragPictureDemo. A snapping grid, depending on what you want it to do, may take some extra effort. And it is possible to do this without the drag and drop/data transfer support. You can build your own system to do this. Just depends on what you want.
 
Jean-Yves Tinevez
Greenhorn
Posts: 22
Eclipse IDE Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Craig Wood:
The tutorial has a page on drag and drop Introduction to Drag and Drop and Data Transfer


Thank you, i'll start by that.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!