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 200567 - "Design this container" and "Design parent" doesn't show same containers
Summary: "Design this container" and "Design parent" doesn't show same containers
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 11:06 UTC by asenk
Modified: 2011-08-02 08:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
5 steps (100.23 KB, image/png)
2011-08-01 11:06 UTC, asenk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-08-01 11:06:07 UTC
Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-10-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/tester/.netbeans/7.0

If I use "Design this container" to design some child container, and then I use "Design parent" to go backwards, I can see different things in design window. See attachment for more details.

Steps to reproduce:
1.Create some J2SE project and then create JFrame Form
2.In JFrame Form place some JScrollPane into it place some JPanel (JPanel should be bigger than JScrollPane) and into the JPanel place some Swing components.
3.In inspector invoke pop up menu on JScrollPane. Click on Design this container.
4.In inspector invoke pop up menu on JPanel. Click on Design this container.
4.In inspector invoke pop up menu on JPanel. Click on Design parent-> JScrollPane.
4.In inspector invoke pop up menu on JScrollPane. Click on Design parent-> Top Parent.
Comment 1 asenk 2011-08-01 11:06:37 UTC
Created attachment 109726 [details]
5 steps
Comment 2 Jan Stola 2011-08-02 08:18:19 UTC
If I understand correctly then you are complaining that pictures 2 and 4 are different. In other words, that the size of the designed container (=JScrollPane) is not the same there.

There is no correct size of the designed subcontainer. It's actual size during runtime will be determined by the size of its parents (and by their layout managers).

When we switch the designed container then there are two reasonable possibilities for the size of the designed container.

1. Keep the mental map of the user, i.e., if the new designed container was present in the old one then try to keep its size.

2. Show the container in its preferred size.

We apply the first rule where possible and use the second rule otherwise. Hence, the behaviour described in this issue is as designed. When you go from picture 1 to picture 2 then we apply rule 1 because the JScrollPane is on picture 1 (i.e. we use the size from the picture 1). On the other hand, when you go from picture 3 to picture 4 then we apply rule 2 because JScrollPane is not on picture 3.