home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.3 KB | 41 lines |
- /*----------------------------------------------------------------------*/
- /*----------------------------------------------------------------------*/
- /* Jim Morey - morey@math.ubc.ca - Mar 10,1996 */
- /*----------------------------------------------------------------------*/
-
- import java.io.*;
- import java.applet.*;
- import java.awt.*;
- import java.net.*;
- import java.lang.*;
- import Rotator;
-
- /*----------------------------------------------------------------------*/
- public class RotatorBox extends Applet {
-
- /* - - - - - - - - - - - - - - - - - - - - - - */
- public void init() {
- setBackground(new Color(255,200,200));
- Color foreground = Color.lightGray;
- String config = getParameter("solid");
- URL here = this.getDocumentBase();
- try {
- /* .. get solid info .. */
- int H = 300;
- int W = 300;
- InputStream is_solid = new URL(here,config).openStream();
- Solid solid = new Solid(is_solid,W,H,10);
- is_solid.close();
- Rotator rotator= new Rotator(this,solid,W,H);
- new Thread(rotator).start();
- add("South",rotator);
- is_solid.close();
- show();
- } catch (MalformedURLException e){
- System.out.println("MalformedURLException --config!");
- } catch (IOException e){
- System.out.println("IOException --config!");
- }
- }
- }
-