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

PrintJob font problem on JDK1.2, works fine on JDK1.1.x

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • 2d
    • x86
    • windows_nt


      ingrid.yao@Eng 1999-04-14

      Compile and run the following test java application on JDK1.1.7/1.1.8,
      2.93Kb where sent to the printer and the results where very "crisp".
      But if you compile and run it on JDK1.2fcs/JDK1.2.1, 131Kb where sent
      to the printer and the results where very grainy, like it was printed
      on a dot matrix printer.

      Platform Info
      =============
      Windows NT 4.0, service pack 4, and has 128 Mb ram


      test program
      =============
      import java.awt.*;

      public class PrintJobTest extends Frame
      {
          public static void main( String[] args )
          {
           new PrintJobTest();
              System.exit( 0 );
          }

          public PrintJobTest()
          {
              java.awt.PrintJob pj = getToolkit().getPrintJob( this, "Print Job Test", null );
              if (pj != null) {
                  Graphics pg = pj.getGraphics();

                  if (pg != null) {
                      print( pg );
                      pg.finalize();
                  }
                  pj.end();
                  pj.finalize();
              } else {
                  System.err.println( "pj = null" );
              }
          }

          public void print( java.awt.Graphics g )
          {
              g.setColor( java.awt.Color.black );
              g.drawString( "Print Job Test", 72, 72 );
              g.drawString( "The VM Vendor = " + System.getProperty( "java.vendor" ), 72, 144 );
              g.drawString( "The VM Version = " + System.getProperty( "java.version"), 72, 216 );
              g.drawString( "The Class Version = " + System.getProperty( "java.class.version" ), 72, 288 );
          }
      }


            prr Philip Race
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: