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

java.awt.Frame paint() graphics origin set to client-area origin.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      1.2beta3
    • Introduced In Version:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: pc7213 Date: 09/12/97


      Behavior of java.awt.Frame.paint(Graphics g) differs between
      JDK 1.1.3 and JDK 1.2EA2 under Win95/NT. In the former
       case, the passed graphics has its origin set to (0,0); in the latter
      case, the graphic origin is set to the frame's insets.

      Sample code:

      import java.awt.*;

      public class TestFrame extends Frame
      {
          public static void main(String args[])
          {
              Frame frame = new TestFrame();
              frame.setSize(200, 200);
              frame.show();
          }

          public void paint(Graphics g)
          {
              // The top part of this rectangle is obscured by
              // the frame's title bar under JDK 1.1.3, but not
              // under JDK 1.2 EA2.
              g.drawRect(0, 0, 30, 30);
          }
      }
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            ibdsunw Ibd Ibd (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: