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 - Wrong order of componentShowing and getPreferredSize ()
Summary: Wrong order of componentShowing and getPreferredSize ()
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
Depends on:
Blocks: 23560
  Show dependency tree
 
Reported: 2002-05-15 18:09 UTC by Jaroslav Tulach
Modified: 2008-12-23 09:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Apply the diff and try to open Tools/Options (3.54 KB, patch)
2002-05-15 18:10 UTC, Jaroslav Tulach
Details | Diff

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