File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Applets
Bookmark "embedded Applet in web broswer " Watch "embedded Applet in web broswer " New topic

embedded Applet in web broswer

jite eghagha
Ranch Hand

Joined: Oct 06, 2006
Posts: 128
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);

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

Joined: Mar 22, 2005
Posts: 42965
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"
I agree. Here's the link:
subject: embedded Applet in web broswer
It's not a secret anymore!