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.
Continuous buid from 20060913, Win XP, JDK 1.6 build 97. 1. Design a simple panel by dragging a few components, e.g. the one shown in the screenshot 2. Click Preview Design => It is possible to resize the frame to the point that the components do not fit in - there should be a reasonable default minimum size so components are never hidden. Note that due to this issue, the form does not look "native", because with native Windows dialogs this can never happen, as they are not resizeable :-)
Created attachment 33999 [details] Screenshot of the form where components are partially hidden
This is a Swing bug (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4320050 ). and there is no simple workaround. Note that the bug is claimed to be fixed in JDK 6.0. Unfortunately it doesn't mean that it will not be possible to resize windows below their automatically _calculated_ minimum size. JDK 6.0 allow you to set some fixed size (using setMinimumSize() method) only. We will not generate such a code automatically because it would negatively affect windows with dynamic content. If your window is not dynamic and you are running on JDK 6.0, you can add yourWindow.setMinimumSize(yourWindow.getMinimumSize()); behind your pack() call to achieve the requested behaviour. If your window has dynamic content or you are running on JDK 5.0, you can use of the (ugly) workarounds mentioned in the comments of the bug 4320050.
Thanks for the useful info. We have some issues filed against NetBeans UI about windows being too small in the Japanese localization, which uses larger fonts. So I understand there is not really a clean way to fix these issues, especially because NetBeans still needs to run on JDK 5. What exactly do you mean by "dynamic content"? Does this mean windows where some components appear and disappear based on the window's state, or are these windows whose components are different each time they are displayed based on init parameters (but that do not change once the windows are displayed), or does it mean something else? Thanks. BTW, I agree with the comments in the JDK bug that this issue makes Java Swing UI look unprofessional.
> What exactly do you mean by "dynamic content"? Windows where some components appear and disappear based on the window's state (e.g. when some radio button or checkbox is selected) e.g. the windows where the minimum size can change after packing (invocation of pack() method) of the dialog. For such windows even the support in JDK 6.0 is not sufficient e.g. it is not sufficient to call yourWindow.setMinimumSize(yourWindow.getMinimumSize());