2

I want to see the source files of this Applet

How can I do to get it?

mpluse
  • 1,857
  • 6
  • 18
  • 25

1 Answers1

2

The source code of the page is:

<HTML>
<HEAD>
<TITLE>Non-Directed, Non-Weighted Graph</TITLE>
</HEAD>
<BODY>
   <TABLE BORDER UNITS=PIXELS COLSPEC="L330 L250" CELLPADDING=7>
   <CAPTION><STRONG>Lafore's Non-Directed
Non-Weighted Graph</STRONG></CAPTION>
      <TH>Graph
      <TH>Operation
      <TR>
      <TD>
         <APPLET
            CODE=GraphN.class
            WIDTH=440
            HEIGHT=320>
         </APPLET>
    ...
</BODY>
</HTML>

As you can see the Java code is located at http://mainline.brynmawr.edu/Courses/cs206/spring2004/WorkshopApplets/Chap13/GraphN/GraphN.class.

  • Click on the link below and save the file wherever you want.
  • Use a java decompiler to see the source

Here is the output produced by:

enter image description here:

import java.applet.Applet;
...
import java.util.EventObject;

public class GraphN extends Applet
  implements Runnable, ActionListener, MouseListener
{
  private Thread runner;
  private vertexGroup theVertexGroup;
  private boolean wasClearPressed = false;
  private Button newButton;
  private Button dfsButton;
  private Button bfsButton;
  private Button treeButton;
  private Button viewButton;

  public void init()
  {
    addMouseListener(this);

    setLayout(new FlowLayout());
    Panel localPanel1 = new Panel();
    add(localPanel1);
    localPanel1.setLayout(new FlowLayout());
    ...
  }
}
Aubin
  • 14,617
  • 9
  • 61
  • 84
  • 1
    There could be legal problems for this. – Rafael Apr 22 '13 at 19:25
  • I tried to follow the steps above for the site http://www.fi.uu.nl/toepassingen/02018/toepassing_wisweb.en.html which yielded the address http://www.fi.uu.nl/toepassingen/02018/fi/losop2/Losop2.class but it's not working. What's wrong? – user2321323 Feb 28 '18 at 18:30
  • The source is http://www.fi.uu.nl/javaclasses/jars/losop2.jar. It contains a lot of classes. The link you give is an HTML error page. – Aubin Feb 28 '18 at 21:54