Your system properties
Code
//Java version 1.0.2 code
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class SysPropsApplet extends Applet {
AudioClip loopClip;
Image im;
//Construct the applet
public SysPropsApplet() {
}
//Initialize the applet
public void init() {
Font f = new Font("Courier", Font.PLAIN, 12);
this.setFont(f);
loopClip = getAudioClip(getCodeBase(), "Aveng.au");
im = getImage(getCodeBase(), "av.gif");
}
public void paint(Graphics g) {
Font f = this.getFont();
int fh = f.getSize();
int il = (int)(fh / 2);
if (im != null) {
g.drawImage(im, 0, 0, 186, 240, this);
g.drawImage(im, 186, 0, 186, 240, this);
g.drawImage(im, 372, 0, 186, 240, this);
}
g.drawString(" Operating System Name............: "
+ prop("os.name"), 0, fh + il);
g.drawString(" Operating System Architecture....: "
+ prop("os.arch"), 0, 2*fh + il);
g.drawString(" Operating System Version.........: "
+ prop("os.version"), 0, 3*fh + il);
g.drawString(" version number of the Java system: "
+ prop("java.version"), 0, 5*fh + il);
g.drawString(" vendor specific string...........: "
+ prop("java.vendor"), 0, 6*fh + il);
g.drawString(" vendor URL.......................: "
+ prop("java.vendor.url"), 0, 7*fh + il);
g.drawString(" Java class version number........: "
+ prop("java.class.version"), 0, 8*fh + il);
}
public String prop(String s) {
return System.getProperty(s);
}
public boolean mouseEnter(Event e, int x, int y) {
//Play the audio file
loopClip.loop();
return true;
}
public boolean mouseExit(Event e, int x, int y) {
//Stop playing the audio file
loopClip.stop();
return true;
}
}