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

drawString erases output with 1.1 Printing API

XMLWordPrintable

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



      Name: dbT83986 Date: 04/06/99


      The second drawString erases the output from the first drawString.

      public class PrintHelloWorld
      {
      public static void main( String args[])
      {
      Frame myFrame = new Frame();
      PrintJob job = Toolkit.getDefaultToolkit().getPrintJob( myFrame, "Hello", null );
      Graphics g = job.getGraphics();
      g.setColor(Color.black);
      int x = 50;
      int y = 100;
      g.drawString( "Hello World", x, y );
      g.drawString( "Hello World Again", x + 40, y + 30 );
      g.dispose();
      job.end();
      System.exit(0);
      }
      }

      I am using JDK1.2.0.0 the final production release version for Win95/NT. I am printing to an HP 1200C color printer.

      (Review ID: 56316)
      ======================================================================

            prr Philip Race
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: