예제 #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);
 }
예제 #2
0
 void showFrame() {
   if (ogf == null) {
     started = true;
     ogf = new CirSim(this);
     ogf.init();
     repaint();
   }
 }
예제 #3
0
 public void destroy() {
   if (ogf != null) ogf.dispose();
   ogf = null;
   repaint();
 }
예제 #4
0
 public void componentResized(ComponentEvent e) {
   if (ogf != null) ogf.componentResized(e);
 }
예제 #5
0
 public void toggleSwitch(int x) {
   ogf.toggleSwitch(x);
 }
예제 #6
0
 public static void main(String args[]) {
   ogf = new CirSim(null);
   ogf.init();
 }
예제 #7
0
 void destroyFrame() {
   if (ogf != null) ogf.dispose();
   ogf = null;
   repaint();
 }