Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Basic Applet question

$
0
0
I want to add login form in to my website. But I can't. In Eclipse everything works fine, but on the browser something is wrong. It shows class not found exception
package kurybinis;
import javax.swing.*;
/*
 * Programos paleidimo klase. Paleidžia programą.
 */
public class Pagrindine extends JApplet{

	private PrisijungimoLangas pl;
	
	public static void main(String[] args){
		Pagrindine pgr = new Pagrindine();
		pgr.init();
	}
	
	public void init(){
		try {
            SwingUtilities.invokeAndWait(new Runnable() {
                public void run() {
                	hello();
                }
            });
        } catch (Exception e) {
            System.err.println("createGUI didn't complete successfully");
            e.printStackTrace();
        }
	}
	
	public void hello(){
		pl = new PrisijungimoLangas();
    	setContentPane(pl);
    	setSize(600,600);
	}

}


I think gui class isn't important here. so I will also add my html file:
<html>
<body>
<APPLET code="Pagrindine" WIDTH="600" HEIGHT="600" ARCHIVE="game.jar"></applet>
</body>
</html>

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>