Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6509330

ServiceUI.printDialog ignores top margin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • 9
    • 5.0, 6
    • client-libs
    • 2d
    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.5.0_09"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      In the printer dialog
      PrinterJob.printDialog ( PrintRequestAttributeSet )
      or ServiceUI.printDialog
      the value of the top margin is ignored if no other margin value is changed.

      The reason:
      The class sun.print.ServiceDialog is used. In the constructor of the inner class MarginsPanel the JFormattedTextField topMargin gets two listeners but it loses them since a new JFormattedTextField is assigned to topMargin. This happens twice, a second time after the definition of bottomMargin. Without listeners the method updateMargins is not called for topMargin.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Open the printer dialog with
      PrinterJob.printDialog ( PrintRequestAttributeSet )
      or ServiceUI.printDialog.
      Switch to the PageSetupPanel. In the MarginsPanel change only the top margin and press OK. Do not change any other margin value.
      The new top margin does not appear in the MediaPrintableArea attribute of the resulting PrintRequestAttributeSet.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      The user must change another margin value, too.

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              jgodinez Jennifer Godinez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: