Example #1
0
 public void paint(Graphics g) {
   String s = "Applet is open in a separate window.";
   if (!started) s = "Applet is starting.";
   else if (ogf == null) s = "Applet is finished.";
   else if (ogf.useFrame) ogf.triggerShow();
   g.drawString(s, 10, 30);
 }
Example #2
0
 void showFrame() {
   if (ogf == null) {
     started = true;
     ogf = new CirSim(this);
     ogf.init();
     repaint();
   }
 }
Example #3
0
 public void destroy() {
   if (ogf != null) ogf.dispose();
   ogf = null;
   repaint();
 }
Example #4
0
 public void componentResized(ComponentEvent e) {
   if (ogf != null) ogf.componentResized(e);
 }
Example #5
0
 public void toggleSwitch(int x) {
   ogf.toggleSwitch(x);
 }
Example #6
0
 public static void main(String args[]) {
   ogf = new CirSim(null);
   ogf.init();
 }
Example #7
0
 void destroyFrame() {
   if (ogf != null) ogf.dispose();
   ogf = null;
   repaint();
 }