• Advertisement
Sign in to follow this  

java applet question

This topic is 4338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to work on a Java applet, but after compiling it and saving the class file in the same directory. I run it and everything's fine. but then I make some changes, recompile, and run the applet again, and it doesn't change. I've even deleted the class file, closed the browser, and reopened it and it still displays the page like before. here's my HTML: <html> <head> <title>Applet Test</title> </head> <body>


<Applet Code="AppletPractice.class" width=400 height=200> </Applet> </body> </html>

import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JButton;

public class AppletPractice
extends Applet
implements ActionListener
{
JButton button;
int numText;

public void init()
{
}

public void stop()
{
}

public void paint(Graphics g)
{
g.drawString("Hello World", 20, 40);
}

public void actionPerformed(ActionEvent e)
{
}
}

thanks

Share this post


Link to post
Share on other sites
Advertisement
Browsers often keep things in caches so that they load faster. Try hitting the "Refresh" button. If that does not work, most browsers have an option to clear the cache somewhere. You could try that.

Hope that helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement