JDK-6354805 : Scrollpane does not re-validate the components when changing the font size at runtime, XToolkit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2005-11-23
  • Updated: 2011-04-29
Related Reports
Relates :  
Relates :  
I have added a button to a scrollpane and scrollpane is added to a frame in FlowLayout. Scrollpane's scrollbar policy is set to AS_NEEDED and the size of the scrollpane is same as button initially. Hence no scrollbars seen. Now on clicking the button, I am changing the font size of the scrollpane to 30 and setting a different font. After this, I am invalidating and validating the scrollpane. I expect button to inherit the new font and resize accordingly. This works fine on Win32 and Motif where scrollpane introduced a scrollbar after the re-validation. But on XAWT, the button size did not change and the caption in the button gets truncated to the current size of the button. This is incorrect. 

This is reproducible on Mustang as well as Tiger with XAWT. This is not reproducible with Motif/Win32. Hence it may appear like a regression since XAWT is made the default pipeline on Sol in Mustang. I reproduced it SolSparc10-JDS.

I have attached a sample test. Execute the sample test. Click on the button. If scrollbars do not appear and button caption gets truncated, bug is reproduced.

EVALUATION the problem is in content window of ScrollPane - it initiates once at the moment of creation and after that it's not updated.