FileDocCategorySizeDatePackage
FXTrack.javaAPI DocExample2264Thu Mar 18 21:04:02 GMT 1999None

FXTrack

public class FXTrack extends Applet
Simple Applet to track a Fedex shipment without having to wait for all of FedEx's bloated images to download.
Note:
The URL used was garnered empirically, is not documented, and is subject to change without notice! USE AT OWN RISK.
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: FXTrack.java,v 1.3 1999/03/19 02:04:02 ian Exp $

Fields Summary
GregorianCalendar
gc
DecimalFormat
nf
String
shipDate
Choice
destChooser
The choice item for destination country
ActionListener
handler
protected Button
goButton
protected TextField
numField
Constructors Summary
Methods Summary
public voidinit()


	   
		setBackground(Color.pink);
		setLayout(new GridLayout(3,2));
		add(new Label("Dest. Country:", Label.RIGHT));
		add(destChooser = new Choice());
		destChooser.add("ca");
		destChooser.select(0);
		destChooser.add("sv");
		destChooser.add("uk");
		destChooser.add("us");
		add(new Label("Waybill #", Label.RIGHT));
		add(numField = new TextField(12));
		numField.addActionListener(handler);
		add(new Label());	// filler, for grid
		add(goButton = new Button("Go for it!"));
		goButton.addActionListener(handler);

		gc.roll(Calendar.DAY_OF_MONTH, false);			// yesterday
		shipDate = 	// mmddyy format
			nf.format(gc.get(Calendar.MONTH)+1) +		/* zero-based */
			nf.format(gc.get(Calendar.DAY_OF_MONTH)) +
			nf.format(gc.get(Calendar.YEAR)%100);