// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.awt.*;
import java.awt.event.*;

public class RanCol extends Frame {
   public RanCol() {
      float r = (float)Math.random();
      float g = (float)Math.random();
      float b = (float)Math.random();
      setBackground(new Color(r, g, b));
      setSize(100, 100);
      addWindowListener(new WindowAdapter() {
                           public void windowClosing( WindowEvent e ) {
                              System.exit( 0 );
                           }
                        }); 
   }
   public static void main(String[] args) {
      RanCol f = new RanCol();
      f.show();
   }
}
