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.

Bug 130537

Summary: Cut and Paste between two JPanels
Product: guibuilder Reporter: Petr Dvorak <joshis>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jvagner
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 136425    
Attachments: Diagram of how a keyboard shortcuts work

Description Petr Dvorak 2008-03-19 15:52:30 UTC
Product Version: NetBeans IDE Dev (Build 200803190008)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.24-12-generic running on i386; UTF-8; en_US (nb)

Create two JPanels in the JFrame (see the screenshot). Insert some buttons in the left one. Select all buttons, invoke
Cut from the pop-up menu (for example). Now, select the right JPanel in the Visual Designer, right-click it, choose
Paste. Buttons are inserted in the Panel (hierarchically), but not in the proper position.

If you paste buttons from one panel to another, you would probably expect that the relative position of the buttons with
respect to currently containing panel remains unchanged. Instead, an absolute position is kept when you do Cut+Paste.
Relative positions ARE kept as expected when you do Copy+Paste.

See the screenshot.
Comment 1 Petr Dvorak 2008-03-19 15:53:08 UTC
Created attachment 58676 [details]
Diagram of how a keyboard shortcuts work
Comment 2 Tomas Pavek 2011-02-01 10:50:40 UTC
*** Bug 154593 has been marked as a duplicate of this bug. ***
Comment 3 Tomas Pavek 2011-02-01 10:52:35 UTC
The positions in the target panel are ok, the problem is that the source panel is shrunk. Also as issue 154593.
Comment 4 asenk 2011-10-04 12:27:57 UTC
Still valid

Product Version: NetBeans IDE Dev (Build 201110030601)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)
Comment 5 Tomas Pavek 2012-06-15 13:18:16 UTC
Just tried it again, it's happening in 7.0, but works well in 7.1 and 7.2.