-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
x86
-
windows_2000
Name: yyT116575 Date: 05/11/2001
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\>java -version
java version "1.3.1-rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-rc2-b23)
Java HotSpot(TM) Client VM (build 1.3.1-rc2-b23, mixed mode)
1 - Place the following code in a file called CenteredTest.java (obtained from
the Core Java book CD)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class CenteredFrame extends JFrame {
public CenteredFrame() {
setTitle("CenteredFrame");
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension d = tk.getScreenSize();
int screenHeight = d.height;
int screenWidth = d.width;
setSize(screenWidth / 2, screenHeight / 2);
setLocation(screenWidth / 4, screenHeight / 4);
Image img = tk.getImage("icon.gif");
setIconImage(img);
}
}
public class CenteredTest {
public static void main(String[] args) {
JFrame frame = new CenteredFrame();
frame.show();
}
}
2 - create 2 icons - one in GIF87a format and one in GIF89a format (two images
can be found in the attachment)
3 - rename the GIF87a version to icon.gif and run the program; the app appears
and the icon properly displays on the title bar
4 - rename the GIF89a version to icon.gif and run the program; the program
never even comes up. If it does come up then the icon does not appear in the
title bar.
I've tried this out on both JDK1.3 and JDK1.3.1 RC2, both had the same problem.
Bug report 4175560 supposedly fixed the problem and was closed but it clearly
is not (as others have seen as well).
(Review ID: 124150)
======================================================================
- duplicates
-
JDK-4404448 JAI : cannot load Clinton.gif (GIF89)
-
- Open
-