FileDocCategorySizeDatePackage
FXTrack.javaAPI DocExample2272Sun Feb 08 21:33:50 GMT 2004None

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, http://www.darwinsys.com/
version
$Id: FXTrack.java,v 1.4 2004/02/09 03:33:49 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);