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

RFE: Let PrinterJob.printDialog dialog box be optionally modal

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.3.1
    • Fix Version/s: 1.3.1_03
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      03
    • CPU:
      x86
    • OS:
      windows_nt

      Backports

        Description



        Name: krT82822 Date: 09/19/99


        The dialog box shown by PrinterJob.printDialog is not modal and it should be. There is no option to make it modal even though most, if not all, applications will need it to be modal. Users with little knowledge may lose the dialog behind the browser window and not know how to get it back again.

        public class Applet extends javax.swing.JApplet
            implements java.awt.print.Printable
        {
            public void start()
            {
                java.awt.print.PrinterJob pjob =
                    java.awt.print.PrinterJob.getPrinterJob();
                pjob.setPrintable(this);
                if (pjob.printDialog()) // not modal, but needs to be
                {
                    try
                    {
                        pjob.print();
                    }
                    catch (java.awt.print.PrinterException e)
                    {
                    }
                }
            }
            
            public int print(java.awt.Graphics g,
                java.awt.print.PageFormat pf,int index)
            {
                if (index <= 0)
                {
                    return java.awt.print.Printable.PAGE_EXISTS;
                }
                return java.awt.print.Printable.NO_SUCH_PAGE;
            }
        }
        (Review ID: 93979)
        ======================================================================

        Failed in JDK1.4.1, JDK1.4.1_01 but it was fixed in merlin-beta so should be fixed in Hopper also.


        ###@###.### 2002-12-19

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                son Oleg Sukhodolsky (Inactive)
                Reporter:
                kryansunw Kevin Ryan (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: