Community
Participate
Working Groups
Created attachment 289338 [details] Small Java SWT test program demonstrating setSize() defect The attached is a small SWT program that simply has a ScrolledComposite containing a Composite containing a Text widget. Attempts to call Composite setSize() with a point of X or Y value larger than 32K gets "chopped" at 32K. The attached program creates a long text String and correctly calculates new Composite size based on the long String. Calling composite.setSize() accepts the newly calculated bounds, no exception, but immediate call to composite.getSize() always returns 32K. The provided example just calls println() with the size being passed to setSize(), and then the value immediately returned with getSize(). They should be the same, but getSize() is constant 32K. My speculation somewhere the signed integer X,Y from the Point object is getting cast/converted to unsigned short. Could be an issue with the SWT JNI wrapper, or possibly in the Windows DLL, but the same example fails on RHEL Linux using the GTK wrapper.
Apologizes, should be 64K. The integer size values appear to be chopped at 64K, unsigned short max.