Can't show incorrect GIF image

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 1.0, 1.1.7
    • Component/s: client-libs
    • 2d
    • other, x86
    • generic, windows_nt



      Name: keC81026 Date: 02/05/99



      to reproduce
              1. Get an image that attached to the bug No.4189672,rename it to
      1.gif
              2. compile and run StarImageApp.java
              3. Note, that image does not displaying, though PhotoShop,
      ACDSee, Netscape displays it

      ===================== StarApplication.java ===============
      import StarFrame;

      public class StarApplication {
      public StarApplication( ) {
      };

      public static void main( String argv[] ) {
      StarFrame f = new StarFrame( );
      };

      }
      ===========================================================
      ==================== StarFrame.java =======================
      import java.awt.*;
      import StarPanel;

      public class StarFrame extends Frame {
      public StarFrame( ) {
      StarPanel p = new StarPanel();
      setLayout( new BorderLayout() );
      add("Center", p );
      show( );
      resize( p.getPreferredSize( ) );
      };
      };
      ===========================================================
      ======================= StarPanel.java ====================
      import java.awt.*;
      import java.awt.image.*;
      import java.applet.*;
      import java.net.*;

      public class StarPanel extends Panel {

         public static Image starImage;
          static
          {
      try {
      starImage = Toolkit.getDefaultToolkit().getImage("1.gif");
      } catch (Exception e) {
      System.out.println("Couldn't load images: " + e);
      }
          }

         public StarPanel( ) {
      init();
         };

         public void init( ) {
      resize( getPreferredSize() );
         };

         public void paint( Graphics g ) {
      g.drawImage( starImage, 0, 0, this );
         };

         public Dimension getPreferredSize( ) {
      return( new Dimension (500,500) );
         };
      };
      ===========================================================
      ======================================================================

            Assignee:
            Unassigned
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: