看看Java这些程序

来源:百度知道 编辑:UC知道 时间:2024/05/31 17:23:59
package com.borland.samples.welcome;
import.java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;

public class Applet1 extends JApplet {
boolean isStandalone = false;
/**Get a parameter value*/
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}

/**Construct the applet*/
public Applet1() {
}
/**Initialize the applet*/
public void init() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception {
this.setSize(new Dimension(400,300));
}
/**Get Applet information*/
public String getAppletInfo() {
return "Applet Information";
}<

package com.borland.samples.welcome;
import java.awt.*;
//import java.awt.event.*;
//import java.applet.*;
import javax.swing.*;

public class Applet1 extends JApplet {
boolean isStandalone = false;
/**Get a parameter value*/
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}

/**Construct the applet*/
public Applet1() {
}
/**Initialize the applet*/
public void init() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception {
this.setSize(new Dimension(400,300));
}
/**Get Applet information*/
public String getAppletInfo() {
return "Applet Information";
}
/**Get parameter info*/
publ