> Just checked the source code of Eclipse's search & replace dialogue (the > one that annoys me the most) and verified that shell.pack() method is > never called. This deserves an entry in bugzilla. i'm not sure what kind of effects you get in a jvm and java - but in most cases in C if you do this kind of thing the size you get is often indeterminate as its random "stack values" being used for the sizing.
Hi,
In Java almost all widgets have relative sizes. When you call pack() all buttons and labels change their size to the minimum one that's enough to hold the text of the widget. After all labels and buttons have minimum sizes, all other elements are resized proportionally and aligned. If necessary, some buttons and labels are finally enlarged to equal the size of related elements.
If you don't pack() the components of a window or you don't specify size constraints, their sizes remain undefined and the displayed window may be a mess. In some cases, default widget sizes are good enough and the dialogue has pleasant aspect, but there is no written warranty and you get a nice result only by chance.
I write Java applications that run on Windows, Linux and Mac OSX. I prefer to work on Linux because if a window looks good on Linux, I'm quite sure that it will be also OK on Windows and Mac. However, some of my colleagues prefer to work on Windows and when I run their code on Linux, sometimes I see the wrong size defects that Eclipse shows when running on Enlightenment. Those defects are easily corrected adding the right constraints and calling shell.pack(). Some dialogues are also wrong when you run Eclipse on GNOME, but the defects are less obvious and fortunately those wrong windows allow resizing.
For what its worth: this problem is not new. It has been reported in Eclipse's bugzilla (bug 77267)
Regards,
Rodolfo
|
-- Rodolfo M. Raya <[EMAIL PROTECTED]> Maxprograms |
