[OpenJDK 2D-Dev]  RFR JDK-6801613, , Cross-platform pageDialog and printDialog top margin entry broken
prasanta.sadhukhan at oracle.com
Tue Apr 5 11:08:39 UTC 2016
Please review a fix for jdk9
The issue was the PrinterJob cross-platform "Page setup dialog" top
margin entry is broken.
If you enter a value in the top margin field and hit "OK", the value
is not updated in the PageFormat instance return value,
nor is it updated in the attribute set used to call the pageDialog method.
Tabbing out of the top margin field before hitting OK does not fix the
Likewise, clicking on a different margin entry field before hitting OK
also does not fix the problem.
The reason was we created topMargin JFormattedTextField once and added
focusListener and ActionListener to this textfield but
we overwrote the topMargin textField again by creating another instance
and in that instance, we failed to add actionListener or focusListener,
so when we tabbed out of topmargin field, focusLost() method was not
called which would have called updateMargin() method to update the margins.
Fix was to remove this erroneous instance creation and overwriting of
More information about the 2d-dev