This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes embedded Applet in web broswer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "embedded Applet in web broswer " Watch "embedded Applet in web broswer " New topic
Author

embedded Applet in web broswer

jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 127
This applet runs fine but will not show after ebedding it in my browser.


public class MyApplet extends JApplet {
private BuildGraph buildGraph;
private Kruskal k;
private Container contentPane = getContentPane();

public MyApplet() {
k = new Kruskal();
buildGraph = new BuildGraph(k.getAllnewEdges());

Graph G = buildGraph.getGraph();
ViewDemo s = new ViewDemo(G);
s.setSize(450,550);
s.init();
s.start();

contentPane.setLayout(new BorderLayout(550,650));
contentPane.add(s, BorderLayout.WEST);
}

}


<APPLET codebase="org/me/hello/" code="org/me/hello/MyApplet.class" width=350 height=200></APPLET>
[ June 13, 2007: Message edited by: jite eghagha ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41166
    
  45
Where does it run fine - in appletviewer? I kind of doubt that, because with that codebase and code attribute, it would need to be in a directory called "org/me/hello/org/me/hello/MyApplet.class"


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: embedded Applet in web broswer
 
Similar Threads
passing parameter to applet
&#9733; I have a java applet program (yanhua.java) need help!!!
applet and the html file in separate directory
Applet question
Unable to load applet in web browser.