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 23558

Summary: Wrong order of componentShowing and getPreferredSize ()
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: Window SystemAssignee: Peter Zavadsky <pzavadsky>
Status: CLOSED FIXED    
Severity: blocker CC: ttran
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 23560    
Attachments: Apply the diff and try to open Tools/Options

Description Jaroslav Tulach 2002-05-15 18:09:37 UTC
I've tried to override componentShowing in
NbMainExplorer.ExplorerTab in order to delay the
initialization of components inside. Works fine
except for Tools/Options dialog. 

The problem is that first of all the
TopComponent.getPreferredSize () is called and
after that the TopComponent.componentShowing is.
As a result the initial size of the component does
not include the components added in componentShowing.

Please call the componentShowing before other
methods that depend on the content of the
component are called.
Comment 1 Jaroslav Tulach 2002-05-15 18:10:54 UTC
Created attachment 5769 [details]
Apply the diff and try to open Tools/Options
Comment 2 _ ttran 2002-05-15 21:53:08 UTC
> Please call the componentShowing before other
> methods that depend on the content of the
> component are called.

How do you find out the "other methods that depend on the content of
the component are called"?  Module can override any public/protected
method in TopComponent and we don't know how they do it

Comment 3 Peter Zavadsky 2002-05-16 17:32:21 UTC
Fixed in [trunk]

Fix:
core/../windows/ModeImpl.java [1.136]

Yarda: you can put in your change too.
Comment 4 Jaroslav Tulach 2002-05-17 07:55:33 UTC
Works for me.
Comment 5 Quality Engineering 2003-07-01 16:30:49 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.