theCreateTimetableButton.setEnabled(false);
theCreateTimetableButton.addActionListener(new ActionListener() {
public void actionPerformed ( ActionEvent e ) {
//First of all, set the selected route.
if ( theSelectedRoute == null && theTimetableModel.getSize() == 0 ) {
theSelectedRoute = new Route();
theSelectedRoute.setRouteNumber(theRouteNumberField.getText());
for ( int i = 0; i < theStopModel.getSize(); i++ ) {
theSelectedRoute.addStop(theStopModel.get(i).toString(), Route.OUTWARDSTOPS);
}
for ( int i = (theStopModel.getSize()-1); i >=0; i-- ) {