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.
When you select several components, do Edit/Copy and then Edit/Paste, you expect that the components will be pasted with the same layout. Instead, they are all pasted to the leftmost upper corner of the container, without any allignment between them.
Also, it would be ideal if the components could be pasted to the place where the user currently has the mouse cursor. (Preserving their layout.) And also making their relationship to already existing components in the container. This would extremely speedup creation of large forms with repeating groups of items.
The first part of the report describes behaviour that is not ideal, but is as designed. When the component is copied into Free Design it obtains a temporary position in the top left corner (in an independent group/layer) and should be re-positioned by the user. When the user pastes more components then they are (unfortuntately) placed one over another. I agree that this doesn't look very nice, but it even more emphasize that the location is temporary and should be changed. We don't keep relative positions of components while pasting because that would make the user think that the location can be left as it is - which would be incorrect because the components are in an independent group/layer (which could result in unexpected overlaps of components). The second part is a request for enahncement. We will try to reconsider also the first part when we will evaluate the second part for the next release.
We could also consider a special "duplicate" action - which would at one shot create a copy of selected component and place it nearby. Would work also for multiple components. The problematic part is how to define "nearby". This action could also be invoked by Ctrl+C and Ctrl+V pressed on the component (i.e. when trying to paste component to itself).
See also issue 15719.
It would be also productive, if Netbeans support drag&drop with copy. I select several components, move them, push ctrl key (cursor change to +) and when I release mouse button, Netbeans create copy of componet to new position. This is standard in graphics editors as Corel Draw.
*** Issue 81471 has been marked as a duplicate of this issue. ***
Done. Copying now preserves the layout - pasted components are placed over the existing to be placed correctly by the user afterwards. Copying all components from one container to another (empty) does an exact 1:1 copy of the layout. Duplicating has been implemented as well - in a simple way (selected components are copied below (on a new "row"), preserving alignment in columns). Ctrl+drag copying has not been done. We'll create a separate issue if it's appears to be useful or important.
*** Issue 72323 has been marked as a duplicate of this issue. ***