I'm working on software specifications at the moment and just want to get an idea if this would be an easy/hard thing to implement.
What I'd like to do is to be able to move items(rows?) between two listbox(grid?) type controls on the same d开发者_JAVA技巧ialog; no external drag/drop support is needed. In .net apps drag/drop implementation tended to be messy and painful, and I remember MFC being even worse. Is the situation any better in java?
It is not bad at all. Have a look at the tutorial. To start with, see the code for Basic DnD demo, which basically covers what you are looking for. The only thing you have to figure out is exactly what data is packaged for the drag-drop. The right choice will depend on whether you plan to support data from outside your form to be dropped in.
精彩评论