This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Pick up EntityClassesPanel.form & .java from <http://www.netbeans.org/source/browse/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/?only_with_tag=release55> I'll attach a screenshot of the form before changes. The goal is to slightly shorten the class names scroll pane/jtable area, then move everything underneath it upwards. However, I can demonstrate the problem without shortening the class names area. In the second screenshot, I show the items to be moved ctrl-clicked and ready for dragging. The third screenshot shows during drag just before letting go - I expect it to end up like this, but see what happens when I let go in the fourth screenshot.
Created attachment 30284 [details] screenshot before changes
Created attachment 30285 [details] screenshot prepared to drag
Created attachment 30286 [details] screenshot during drag
Created attachment 30287 [details] screenshot after dragging
This behaviour may be unexpected to you, but it is as designed. Note that almost every gesture can have more meanings and we don't have an API (like java.io.mind.* ;-) ) to recognize what you expect in the given situation. Let me explain this test case in detail - when you select several components and move them then they are removed from the layout and a new group is created from them. This group is then placed according to your gestures. In your test case you aligned the group with the right side of the JScrolPane (as it is shown on the third screenshot) => the whole group is aligned to the right with the JScrollPane. If you want to shorten the height of the JScrollPane, then it is sufficient (in this form) to drag the bottom edge of the container up. If you want to shorten the gap below JScrollPane, you should select it and invoke Space Around Component from its contextual menu.
When I "drag the bottom edge of the container up" as you suggested, it didn't behave the way I wanted either. But, the point is that when I let go, I expect it to look like screenshot 3. Otherwise, it should look like screenshot 4 during the dragging. The end result is unexpected. Adding Tomas to the cc because he is the one who told me to file it. Tomas, do you think it's a bug or expected behavior?
Not sure if it is a bug :) It is definitely unexpected. The group is dropped into the second column, which corresponds to how it is implemented. But perhaps in this particular case we could handle it better - by improving the group moving in one dimension only. We might also revisit the rule of keeping (preferring) the columns. This is a good example for both cases.