-
Bug
-
Resolution: Won't Fix
-
P4
-
5.0u12
-
x86
-
windows_xp
Applet window is not made top window after applet invocation.
This behaviour was observed on Windows XP Professional SP2.
Did not try Solaris.
The problem is easily reproducible.
1. testcase
-----------
% more FrameTest.java
import java.applet.*;
import javax.swing.*;
import java.awt.*;
public class FrameTest extends Applet {
public void init() {
System.out.println("Inside init");
createFrame();
}
public void start(){
System.out.println("FrameTest started");
}
public void stop(){
System.out.println("FrameTest Stopped");
}
private void createFrame() {
JFrame f = new JFrame();
f.setBounds(getBounds());
f.getContentPane().add(new Label("Hello World"),BorderLayout.CENTER);
f.setTitle("Hello World");
f.setVisible(true);
}
public void paint(Graphics g) {
}
}
% more FrameHtml.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<applet code = "FrameTest.class" width='300' height='300'>
</applet>
</BODY>
</HTML>
2. Compile applet w/ 1.5.0_12
3. Launch Applet in either IE 6 (Win XP Prof. SP2) or Firefox 1.5.0.12
The applet window immediately after applet startup goes behind the
browser window and then hidden.
4. Compare applet behaviour w/ when compiled with 1.4.2_15.
The applet window stay on the top and is not hidden by the browser window.
This behaviour was observed on Windows XP Professional SP2.
Did not try Solaris.
The problem is easily reproducible.
1. testcase
-----------
% more FrameTest.java
import java.applet.*;
import javax.swing.*;
import java.awt.*;
public class FrameTest extends Applet {
public void init() {
System.out.println("Inside init");
createFrame();
}
public void start(){
System.out.println("FrameTest started");
}
public void stop(){
System.out.println("FrameTest Stopped");
}
private void createFrame() {
JFrame f = new JFrame();
f.setBounds(getBounds());
f.getContentPane().add(new Label("Hello World"),BorderLayout.CENTER);
f.setTitle("Hello World");
f.setVisible(true);
}
public void paint(Graphics g) {
}
}
% more FrameHtml.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<applet code = "FrameTest.class" width='300' height='300'>
</applet>
</BODY>
</HTML>
2. Compile applet w/ 1.5.0_12
3. Launch Applet in either IE 6 (Win XP Prof. SP2) or Firefox 1.5.0.12
The applet window immediately after applet startup goes behind the
browser window and then hidden.
4. Compare applet behaviour w/ when compiled with 1.4.2_15.
The applet window stay on the top and is not hidden by the browser window.
- relates to
-
JDK-6568419 initial_focus flag not working when an applet is compiled with 1.4 and run with 1.5
- Resolved
-
JDK-6593309 applet focus issue with button after minimizing an maximizing
- Resolved