Пример #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();
 }