// // on the off chance that this works, bear in mind that this is a // port from kaosfire.c written by Dr.Kaos Matthew Pearce // to java by the Dustman // // import java.awt.*; import java.applet.*; import kaosfire; public class testkaosfire extends Applet { Button btn_start, btn_stop; kaosfire thing; public void init() { Panel south; this.setLayout( New BorderLayout()); thing = new kaosfire(); this.add("Center", thing); South = new Panel(); btn_start = new Button("Start"); btn_stop = new Button("Stop"); South.add(btn_start); South.add(btn_stop); this.add("South", south); } public boolean action(Event evt, Object what) { if (evt.target == btn_start) { thing.start(); return true; } else if (evt.target == btn_stop) { thing.stop(); return true; } return false; } }
.