Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with java applets
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dan




PostPosted: 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 Confused .

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
Sponsor
sponsor
rizzix




PostPosted: Sun Aug 10, 2003 5:27 pm   Post subject: (No subject)

try modifying it to:

con.add(enterPass, BorderLayout.CENTER);
Dan




PostPosted: 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 Confused
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: