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

Incorrect Page Size from PrintJob

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.1.2
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description



      Name: joT67522 Date: 08/25/97


      In java.awt.PrintJob under Windows 95, the PrintGraphics
      method returns an incorrect page size which is considerably
      smaller than the actual printable area of the page. For
      example:

      import java.awt.*;
      class printTest {
         static public void main( String args[] ) {
          Frame f = new Frame();
          f.add( new Label( "Hello, World!" ) );
            f.pack(); f.show();
            PrintJob pj = f.getToolkit().getPrintJob(f,
               "Test", null);
            Graphics pg = pj.getGraphics();
            Dimension d = pj.getPageDimension();
            pg.drawRect(0,0,d.width,d.height);
            pg.drawLine(0,0,d.width,d.height);
            pg.dispose();
            pj.end();
            f.dispose();
            System.exit(0);
         }
      }

      This should print a box around the entire page,
      but it instead only covers %80 of the page. The
      program works correctly under the other platforms
      I have tried.
      company - Colorado State University , email - ###@###.###
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cchongsunw Creighton Chong (Inactive)
              Reporter:
              johsunw Joon Oh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: