[OpenJDK 2D-Dev] [9] RFR JDK-6801613, , Cross-platform pageDialog and printDialog top margin entry broken
Philip Race
philip.race at oracle.com
Wed Apr 13 15:41:59 UTC 2016
+1 although I think robot may be able to automate this.
-phil.
On 4/5/16, 4:08 AM, prasanta sadhukhan wrote:
> Hi All,
>
> Please review a fix for jdk9
> Bug: https://bugs.openjdk.java.net/browse/JDK-6801613
> webrev: http://cr.openjdk.java.net/~psadhukhan/6801613/webrev.00/
>
> 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
> problem.
> 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
> topMargin textfield.
>
> Regards
> Prasanta
More information about the 2d-dev
mailing list