[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.albireo] Re: Size-Calculation of Embedded Swing Controls in Dialogs

The first solution is not a option because we use a xml to generate the swing components. To pre calculate the size of the components will be a lot of effort. Therefore I tried to put my swing components into a frame (without displaying it), pack the components, get the size and remove the components from the frame. Unfortunatly I had to do this in the SWT thread before the Swing thread is used for really creating the components. You can imagine that this leads into problems;) Is it possible to put the 'swing pre creation and packing' into a sync swing thread?

The second solution could be a work around. The problem there is that you can see the dialog, when it pupups, in the wrong size for a short moment before it resizes to the correct size. The problem here is really to find the correct moment to set the size and I don't know how to figure out when the size calculation of the swing componetns is successfully finished.

Thanks, Dominik