Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 140789 - I18N - Search bar doesn't resize to show help message
I18N - Search bar doesn't resize to show help message
Product: platform
Classification: Unclassified
Component: Quick Search
All All
: P2 (vote)
: 6.x
Assigned To: David Simonek
: I18N
Depends on:
  Show dependency treegraph
Reported: 2008-07-18 17:23 UTC by kaa
Modified: 2008-12-22 14:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

image (17.20 KB, image/jpeg)
2008-07-18 17:23 UTC, kaa
search bar (36.52 KB, image/jpeg)
2008-08-11 17:54 UTC, kaa
In blue circled correct view of prefixes and suffixes (11.96 KB, image/jpeg)
2008-08-11 17:56 UTC, kaa
image (15.91 KB, image/jpeg)
2008-08-13 15:39 UTC, kaa

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2008-07-18 17:23:09 UTC
Product Version: NetBeans IDE Dev (Build 20080715190616)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)
I'm running in the Japan locale, using a pseudo localized Netbeans with font size 16 option.

1. Start NetBeans

The ide has a Search bar. Using fontsize 16 it doesn't resize properly to show help message. See image.
Manual resize didn't help.

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.
Comment 1 kaa 2008-07-18 17:23:53 UTC
Created attachment 64977 [details]
Comment 2 Peter Pis 2008-07-30 09:32:32 UTC
Reassigning to core.
Comment 3 David Simonek 2008-08-01 13:01:05 UTC
OK, I implemented dynamic resizing mechanism that computes length of hint strings on the fly (at some performance cost,
unfortunately). So in your default case it should be OK.

However, there must be a limit for search bar width and I tried to set it to some good value. So if the font is too big
or localized string too long, then it will be cut anyway - but it won't be bug of the system but feature - search bar
must not hide majority of all other toolbars.

Comment 4 Quality Engineering 2008-08-02 15:57:09 UTC
Integrated into 'main-golden', available in build *200808021401* on
User: Dafe Simonek <>
Log: #140789: dynamic preferred size of command text area implemented
Comment 5 kaa 2008-08-11 17:51:58 UTC
Using trunk build 0810 I can't see any changes:

Product Version: NetBeans IDE Dev (Build 200808101401)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22

Search bar must have prefix and suffix with mbyte.
Comment 6 kaa 2008-08-11 17:54:25 UTC
Created attachment 67059 [details]
search bar
Comment 7 kaa 2008-08-11 17:56:39 UTC
Created attachment 67060 [details]
In blue circled correct view of prefixes and suffixes
Comment 8 David Simonek 2008-08-12 10:25:24 UTC
For me it works correctly - even if I put long hint text in search box, it resizes itself correctly. I put significant
effort to implement dynamic resizing according to the hint text. There must be something wrong with the way how NB are
localized or how Swing computes string length in localized version. I'm not able to do anything more, sorry - somebody
with ability to run and debug pseudo localized NB in Japan locale may want to debug the code to find out what is happening -
code is in org.netbeans.modules.quicksearch.QuickSearchComboBar.DynamicWidthTA
Comment 9 kaa 2008-08-13 15:39:15 UTC
The search itself works fine.
The issue is about a size of the search drop down (where grayed hint was shown)
I used the following steps to reproduce:

1. Expand search dropdown
2. Choose `Actions` from the list (grayed hint message will be changed)

The hint message differs from the pseudo localized one. I'm running in Japanese locale, using a pseudo localized
Netbeans with font size 16 option. Compare red and blue ellipses on the image.
Comment 10 kaa 2008-08-13 15:39:56 UTC
Created attachment 67280 [details]
Comment 11 Ken Frank 2008-08-13 16:11:15 UTC
I think part of what is being seen might be not related to i18n per se but to sizes
of main ide window or the search toolbar itself

am on solaris in en locale using fontsize 18

some comments:

I see that when choose some option for viewing like Go To Type, what is shown in the search
bar is those words fully but some other partial character seems to be at beginning of that

for the case of this issue, I think what is different about this is that some characters
at beginning of the pseudo translated line are not being shown ok, which is different
than most/all other resize sitations where its the final characters that might not be shown

it might be related to what characters are placed *before* the actual message, like the 
| for the search 

other comments not related per se to this issue but while looking at search bar:

I also see that the lower parts of the english characters do not show in the search
window, whether the ones shown from dropdown choice or typed in; while not a problem
for english, it could be problem for asian languages where the context of the character
has more important vertical component

also, the textfield seems to allow just some number of search characters/words to be typed in and then
it won't allow any more characters to be added

** I realize that these last 2 observations not related to this issue.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo