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 - Cut and Paste between two JPanels
Summary: Cut and Paste between two JPanels
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 154593 (view as bug list)
Depends on:
Blocks: 136425
  Show dependency tree
 
Reported: 2008-03-19 15:52 UTC by Petr Dvorak
Modified: 2012-06-15 13:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diagram of how a keyboard shortcuts work (59.73 KB, image/png)
2008-03-19 15:53 UTC, Petr Dvorak
Details

Note You need to log in before you can comment on or make changes to this bug.
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.