import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import java.awt.*;
-import java.io.IOException;
-import java.io.PrintStream;
+import java.io.*;
import java.net.URL;
import java.util.LinkedList;
import java.util.StringTokenizer;
// LiveVideoPanel, McsKeyAdapter, McsMouseAdapter, McsMouseMotionAdapter,
// DatagramReader, McsToolBar, MessageReader, KeepAlive
-public class McsClient extends JApplet {
+public class McsClient extends JPanel/*Applet*/ {
+
+ public Container getContentPane() { return this; }
+
+ private String _host;
+ private String _userid;
+ private String _ac;
+ private boolean _enc;
+ public McsClient(String host, String userid, String ac, boolean enc) {
+ this();
+ this._host = host;
+ this._userid = userid;
+ this._ac = ac;
+ this._enc = enc;
+ }
+ public String getParameter(String key) {
+ if (key.equals("bluescreen")) return "false";
+ if (key.equals("ac")) return _ac;
+ if (key.equals("userid")) return _userid;
+ if (key.equals("host")) return _host;
+ if (key.equals("enc")) return _enc ? "on" : "off";
+ throw new RuntimeException("unknown key \""+key+"\"");
+ }
+
+ static void go(String host, String user, String password) throws Exception {
+ JFrame jf = new JFrame();
+ McsClient mcs = new McsClient(host, user, password, false);
+ jf.add(mcs);
+ jf.setSize(1200,1000);
+ jf.pack();
+ jf.show();
+ jf.setSize(1200,1000);
+ mcs.init();
+ jf.repaint(1000);
+ }
+
+
+ // Changes appear above this line //////////////////////////////////////////////////////////////////////////////
private static final int FIXED_SIZE = 1;
private static final int FULL_SCREEN = 2;
private boolean blueScreenDump;
private boolean encryptVideo;
- public McsClient() {
+ private McsClient() {
mcsTargetSize = new McsTargetSize(1024, 768);
datagramList = new LinkedList();
mcsVersion = new McsVersion();
System.out.println("MCS v.3.6 initialized");
isStandalone = false;
String s = getParameter("host");
+ /*
if (s == null)
s = getCodeBase().getHost();
+ */
String s1 = s;
String s2 = getParameter("bluescreen");
if (s2 != null && s2.equalsIgnoreCase("true"))