FileDocCategorySizeDatePackage
Vectry.javaAPI DocExample761Wed Oct 10 16:08:00 BST 2001None

Vectry

public class Vectry extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidpaint(java.awt.Graphics g)

		int index, line=20;
		int i;double d; String s;
		Vector v1 = new Vector();
		Integer i1 = new Integer(77);
		Double d1 = new Double(99.55);
		String s1 = new String("hello sailor");
		v1.addElement(i1);
		v1.addElement(d1);
		v1.addElement(s1);
		
		i= Integer.parseInt(v1.elementAt(0).toString());
		g.drawString("Element 0 is an integer worth "+ i, 50, 20 );
		
		d= Double.parseDouble(v1.elementAt(1).toString());
		g.drawString("Element 1 is a double worth "+ d, 50, 35 );
		
		s=(String)v1.elementAt(2);
		g.drawString("Element 2 is a String containing "+ s, 50, 50);