This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
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: 42959
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!