Firefox not exiting (JApplet)

  • Thread starter Steven J. Sobol
  • Start date
S

Steven J. Sobol

I have a weird problem. Firefox is refusing to exit when I'm on a page
containing a JApplet I'm writing, unless I navigate off that page first. I
have also tried a barebones JApplet created by the Eclipse visual editor;
the only thing I've changed is to add a stop() method:

package com.stevesobol.gallery.editor;

import java.awt.BorderLayout;

import javax.swing.JApplet;
import javax.swing.JPanel;

public class Test extends JApplet {

private JPanel jContentPane = null;

/**
* This is the xxx default constructor
*/
public Test() {
super();
}

/**
* This method initializes this
*
* @return void
*/
public void init() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
}

/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());

}
return jContentPane;
}

public void stop() {
System.out.println("stopping");
}

}

<html><head><title>Photo Thumbnail Generator</title></head>
<body style="margin-top:25px">
<p style="text-align:center">
<object id="broken2" type="application/x-java-applet"
width="500" height="500">
<param name="code" value="com.stevesobol.gallery.editor.Test"></param>
<param name="codebase" value="./"></param>
<param name="type" value="application/x-java-applet"></param>
</object>
</p>
</body></html>


The stop() method is called, but Firefox remains resident in memory. If I
navigate off the page with the applet and then close Firefox, it exits
properly.

JRE 1.5.0_07, Firefox 1.5.0.6, WinXP SP2 with all of the updates.

Thanks in advance
**SJS
 
O

Oliver Wong

Steven J. Sobol said:
I have a weird problem. Firefox is refusing to exit when I'm on a page
containing a JApplet I'm writing, unless I navigate off that page first. I
have also tried a barebones JApplet created by the Eclipse visual editor;
the only thing I've changed is to add a stop() method:

package com.stevesobol.gallery.editor;

import java.awt.BorderLayout;

import javax.swing.JApplet;
import javax.swing.JPanel;

public class Test extends JApplet {

private JPanel jContentPane = null;

/**
* This is the xxx default constructor
*/
public Test() {
super();
}

/**
* This method initializes this
*
* @return void
*/
public void init() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
}

/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());

}
return jContentPane;
}

public void stop() {
System.out.println("stopping");
}

}

<html><head><title>Photo Thumbnail Generator</title></head>
<body style="margin-top:25px">
<p style="text-align:center">
<object id="broken2" type="application/x-java-applet"
width="500" height="500">
<param name="code" value="com.stevesobol.gallery.editor.Test"></param>
<param name="codebase" value="./"></param>
<param name="type" value="application/x-java-applet"></param>
</object>
</p>
</body></html>


The stop() method is called, but Firefox remains resident in memory. If I
navigate off the page with the applet and then close Firefox, it exits
properly.

JRE 1.5.0_07, Firefox 1.5.0.6, WinXP SP2 with all of the updates.

Thanks in advance
**SJS

I'd submit this as a bug to the FireFox team.

- Oliver
 
S

Steven J. Sobol

I'd submit this as a bug to the FireFox team.

Bugzilla already has someone reporting the same thing on bug 285390.

Of course, I installed the browser plugin separately from the JDK. The JDK
is at 1.5.0_07 and the JRE installed with the plugin is 1.5.0_06. I'm going to
try switching to whichever one I'm not using now...
 
S

Steven J. Sobol

Bugzilla already has someone reporting the same thing on bug 285390.

Of course, I installed the browser plugin separately from the JDK. The JDK
is at 1.5.0_07 and the JRE installed with the plugin is 1.5.0_06. I'm going to
try switching to whichever one I'm not using now...

I uninstalled JDK _07 and the JRE _06 that installed when I installed the Java
plugin from Sun's consumer website (java.com). I installed the JDK and the
public JRE _08 from the Java developer website, and the Firefox problem went
away. So I figure, either:

** having two runtimes installed screwed things up somehow, or

** the problem existed in 1.5.0_06 and/or _07 but has been fixed in _08.

Or both.

Whatever it was, it's fixed now.
 
S

Steven J. Sobol

I uninstalled JDK _07 and the JRE _06 that installed when I installed the Java
plugin from Sun's consumer website (java.com). I installed the JDK and the
public JRE _08 from the Java developer website, and the Firefox problem went
away. So I figure, either:

** having two runtimes installed screwed things up somehow, or

** the problem existed in 1.5.0_06 and/or _07 but has been fixed in _08.

Or both.

final note:
Here at the office I am using JDK/JRE _06 and having no problems, so I assume
I screwed something up on the computer at home.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top