Help with java applets
Author |
Message |
Dan

|
Posted: Fri Aug 08, 2003 6:41 pm Post subject: Help with java applets |
|
|
i have been trying to get a java applet to run in my web browser using the html tag < APPLET >, but every time a load the page it says it can not find the class .
HTML code:
code: |
<HTML>
<APPLET CODE = "JPasswordA.class" WIDTH = 450 HEIGHT = 200>
</APPLET>
</HTML>
|
java code:
code: |
import javax.swing.*;
import java.awt.*;
public class JPasswordA extends JApplet
{
JLabel enterPass = new JLabel("Eneter Password");
public void init()
{
Container con = getContentPane();
con.add(enterPass);
}
}
|
any ideas why this is not working? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
rizzix
|
Posted: Sun Aug 10, 2003 5:27 pm Post subject: (No subject) |
|
|
try modifying it to:
con.add(enterPass, BorderLayout.CENTER); |
|
|
|
|
 |
Dan

|
Posted: Mon Aug 11, 2003 8:56 pm Post subject: (No subject) |
|
|
thanks for trying to help. but the problem was with my java instaltion on my computer. i reinstalled java on my computer and now it wroks fine. i guse i had an old or messed up verson of it  |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
|
|