Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reorder list with Drag and Drop  RSS feed

 
Ardel Grider
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a program that pulls a bunch of data, sorts the data into rows and then places them all into a JScrollPane. I have gotten to the point where I am running into 3 problems I can't seem to solve. First is that on scrolling it makes the component I moved jump back to its original location. Second if you drag the component below the screen it doesn't scroll to follow. And third is how to I make the other components know where I am trying to move this component and where they need to move. I am ultimately try to accomplish something like how you can move apps around on a phone expect I only care about vertical movement.

I have built a example program that shows where I am currently at with building this in my main project. Does anyone have any good examples of this or a good direction to go?
The main window:


The Listener:


Thanks.
 
Ardel Grider
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wanted anyone else looking to know it is resolved. The resource I used to resolve it is linked Here. After some editing to the resources code it worked perfectly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!