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.
To see the affects of this bug, run SunOne Studio, release 5 with a larger point size, for example, on Solaris: % runide.sh -fontsize 20 To reproduce: * Create a package * Select New->All Templates * Expand the J2EE node and select "Related CMP Entity EJBs" and then select the Next button. * On the next panel, you can leave the defaults as is and select the Next button * You'll notice on the next panel that the window is not large enough to display all of the components, that is, some are truncated. See the attached jpg image. When debugging this, I found that when the panel is being displayed, eventually a property change event is fired which attempts to resize the NbPresenter object. At the end of the 'propertyChange' method in NbPresenter, the size is set to the minimum size. The call to 'getMinimumSize' causes all panels inside of the NbPresenter object to have their 'getMinimumSize' method called. The related cmp wizard panel that I supplied was returning the correct minimum size, however, I added some 'println's to WizardDescriptor.java, specifically in the ImagedPanel class and noticed that the minimum size returned for that panel is way off. For example, on the actual panel (in the image), the ImagedPanel (which displays the wizard steps) has a width of 198, but 'getMinimumSize' returns 77. So then the resulting size of the NbPresenter object is 121 pixels too short which results in the components getting truncated.
Created attachment 10618 [details] Related CMP Wizard panel which is not sized correctly
hopefully fixed in main trunk, cvs output: /cvs/openide/src/org/openide/WizardDescriptor.java,v <-- WizardDescriptor.java new revision: 1.85; previous revision: 1.84 Fixes ImagedPanel to return consistent minimum and preferred size, as Joe requested. However, I'm not sure if this fix really solves the problems - Joe, could you test on your side? Fix in now psut in netbeans open source repository, main trunk. I'm sorry I'm not able to build SunOne studio at the moment. Thanks.
I just recompiled SunOne Studio with the modified WizardDescriptor.java and another problem occurs. When I start the wizard, the first panel looks fine. When I go to the next panel, the left panel (with the wizard steps) disappears. Once its gone, its gone for good too (if I go next or previous, it never returns). So, this fix does not work. I did a little debugging and as it turns out the image used in SunOne Studio for the ImagedPanel background is one pixel by one pixel. So then the minimum and preferred size returned for the panel is one which is why it disappears. Oddly, the first time through the code, the default minsize (198) is returned. I'm not quite sure why. In any case, that change probably needs to be backed out of the trunk.
Fix rollbacked, issue reopened.
Joe, please try to check if preferred size of your panel is really OK. Code in WizardDescriptor works OK for many wizards, so it's strange that yours is different. I'll try to put debug version of WizardDescriptor for you when I'll have some time.
Dafe, I'll reassign to you because you participate in discussion with Joe you have more information about this issue than me. If I'm wrong assign back to me.
I re-evaluated the problem and I'm almost 100% sure that code in CMP wizard has to do preferred size hardcoding of some sort. Joe, please search through the code and try to find and eliminate any calls to setPreferredSize(size), which override automatic preferred size computation for Swing controls. From the screenshot, it looks like either combo box or tabs in tabbed pane set their pref sizes explicitly, which is probably cause of error. I couldn't find anything what may have caused this in core code. Marking as worksforme. Please reopen with further details if problem still occurs.
Joe, could you please mark issue as VERIFIED if agree or reopen if disagree, thanks in advance.
verified .....