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

Incorrect Page Size from PrintJob

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.2
    • client-libs
    • None
    • x86
    • windows_95



      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 - ###@###.###
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: