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

Linux: Graphics.drawImage doesn't draw image.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description



      Name: skR10017 Date: 05/06/2000



      The following test retrieves an image from JDK Java2D demo and draws it in the frame.
      If you execute this test under
       Java HotSpot(TM) Client VM (build 1.3.0beta-b04, mixed mode ) for Linux
      you will see nothing.

      Please note that if you use drawImage(image,0,0,this) instead of used in the
      test the image will be drawn correctly.

      --------------------------test.java------------------------------
      import java.awt.*;

      public class test extends Frame
      {
          Image image;
          public test()
          {
              try
              {
                  image = Toolkit.getDefaultToolkit().getImage(new java.net.URL("file:"+
                      System.getProperty("java.home")+"/../demo/jfc/Java2D/images/cupanim.gif"));
              }
              catch(Exception e) { }
          }
          public static void main(String [] argv)
          {
              test t=new test();
              t.setSize(200,200);
              t.show();
          }
          public void paint(Graphics g) {
      g.drawImage(image,
      0,0,200,200,
      this);

          }
      }
      ------------------------------------------------------------------


      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mbronsonsunw Mike Bronson (Inactive)
              Reporter:
              kotlsunw Kotl Kotl (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: