2 Replies - 233 Views - Last Post: 21 January 2013 - 11:53 AM Rate Topic: -----

#1 novakasss  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 347
  • Joined: 11-July 12

Basic Applet question

Posted 21 January 2013 - 08:54 AM

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>

This post has been edited by novakasss: 21 January 2013 - 09:16 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Basic Applet question

#2 Flukeshot  Icon User is offline

  • A little too OCD
  • member icon

Reputation: 415
  • View blog
  • Posts: 1,030
  • Joined: 14-November 12

Re: Basic Applet question

Posted 21 January 2013 - 09:31 AM

<html>
<body>
<APPLET code="Pagrindine.class" WIDTH="600" HEIGHT="600" ARCHIVE="game.jar"></applet>
</body>
</html>

might fix your issue.
Was This Post Helpful? 0
  • +
  • -

#3 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2647
  • View blog
  • Posts: 11,172
  • Joined: 20-September 08

Re: Basic Applet question

Posted 21 January 2013 - 11:53 AM

It's unusual (and not hugely logical) to have a client-side driven login to a website. Why do you want to use an applet
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1