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.
It is more apropriate to use getPreferredSize() in NbPresenter (and other places) rather then getMinimumSize(). It is conclusion of working on issue 29054.
The background for this issue can be found in issue 29054 which links to two bugTraq issues. Is is possible that behaviour of getMinimumText (which is not clearly defined I think) will change in next version of JDK and so it would be better to use preffered size to prevent any potential problems.
JDK team comment (test case mentioned in the text can be found in issue 29054 - it is simplified version of what is done in NbPresenter and demonstrates the problem on JTextArea): The problem with the current code is that it does something like: JTextArea text = new JTextArea(); Dimension min = text.getMinimumSize(); The problem with this approach is that you are asking for a minimum size BEFORE the JTextArea has a valid size. As such the JTextArea assumes it can have infinite space in both directions and will return a minimum size that is either very very long or very very wide (at least with the test case you attached). If the JTextArea has a width it will answer the minimum size assuming you want the current width. A better solution is to embed the JTextArea in a JScrollPane. If this isn't possible you should set the size of the JTextArea to match the width you want and then ask for the preferred size. After that you'll get a valid size.
changed this to a bug and version to 4.0 to make sure we won't miss this one in the next release
fixed in core/windows/src/org/netbeans/core/windows/services/NbPresenter.java, rev.1.3
verified