Product Version: NetBeans IDE Dev (Build 200808240201)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
I'm running in Japanese locale, WinXP, using a pseudo localized Netbeans with font size 16 option.
Steps to reproduce the issue:
1. Create Java App
2. Add JPanel to the project.
3. Open project properties and select Code tab
There are several properties with '...' button. After pressing the button I can see a dialog that
doesn't resize to show its header properly. In general it could happen when some dialog is small in width.
The problem is not about exact length of some label or message that is not being shown completely, but that if dynamic
resizing is implemented vs hardcoding, the label or message will show completely.
Assumption is that user does not need to manually resize most windows or dialogs to see all of the UI objects and
information in them. I'm running in pseudo localized locale in which each message/label is sometimes longer than in
English. To account for that in some locales, translations from English (and some other euro languages) could be shown
with longer strings.
Also I'm running at font size 16, which is viewed as a valid font size that might be used. Resizing issues are not just
related to i18n; they might show to user in English locale if they run at larger font size.
Often, these issues happen because the length of some label or message or size of entire window is hardcoded vs using
layout managers or other techniques or api to have the windows or the objects in them, dynamically resize.
Created attachment 69176 [details]
I followed your steps to reproduce and invoked that smaller dialog. I'm able to enlarge that window using mouse, window
is resizable. So you want to add some automatic resize code for enlarging window according window title. It sound
strange to me. Are there any title-resize dialogs inside IDE please?
it's impossible to get the preferred size of a top-level window title.
use can resize the window using either mouse or keyboard.
There is a similar issue 145453.
The fix is possible there.
*** Issue 145453 has been marked as a duplicate of this issue. ***
issue 145453 is a duplicate of this one.
i don't know any native java API to get the preferred size of a top-level window title. if you know such API, please
reopen both issues
I don't know it also.
Seems it is more general problem. I found the same issue for WSDL doc properties.
Created attachment 69758 [details]
I found some stuff via google that talks about this,
I don't know if it applies to nb or not, but here are the pointers.
(andrey, if there are other such issues on this open or in future on dialog title itself and resize, could you
add these pointers to those issues too ?)
there's only one suggested solution in those links - using Dialog's font to calculate preferred title length. but it's
just a hack that wouldn't work in most cases:
- system window manager may set bigger/smaller font size for window titles
- there are usually extra buttons (close/minimize/maximize etc) in window title, their count and size is os dependent
and window manager dependent
i'd suggest file RFE against jdk to add a method for preferred dialog title size
I agree with saubrecht. We cannot fix that reliably without the support from JDK. In ideal case, java.awt.Window.pack()
should be modified to take size of its title into account and change the width of the window accordingly.
> i'd suggest file RFE against jdk
In fact, there is one already. See http://bugs.sun.com/view_bug.do?bug_id=4804922