Skip to content

Commit

Permalink
Depart Times
Browse files Browse the repository at this point in the history
GridPane for depart times has been moved to allow the button to change the text in the text area. The times are currently hard-coded. We should make a class that has random outputs to make it look natural. Commented out fileIO part because it produced errors for me and isn't too helpful for now.
  • Loading branch information
whernandez23 committed Apr 23, 2021
1 parent 93e996d commit 9bfe602
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions Expedia/src/application/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,20 @@ public void start(Stage primaryStage)
clock.setEditable(false);
clock.setPrefHeight(30);
clock.setPrefWidth(900);

//DepartTimes
GridPane right = new GridPane();
Label lb1 = new Label("Depart Times: "
+ " ");
TextArea times = new TextArea();
times.setEditable(false);
times.setPrefHeight(300);
times.setPrefWidth(30);
times.setText("Waiting for Input");
right.add(lb1, 0, 0);
right.add(times, 0, 1);


//body
Label startLoc = new Label(" Starting Location: ");
startLoc.setStyle("-fx-font-weight: bold");
Expand All @@ -78,8 +91,9 @@ public void start(Stage primaryStage)
String strSTA = num1TF.getText();
String strEND = num2TF.getText();

fileIO locLog = new fileIO();
locLog.writeToFile(strSTA, strEND);
times.setText("11:30 AM\n12:20 PM\n1:15 PM\n3:00 PM");
//fileIO locLog = new fileIO();
//locLog.writeToFile(strSTA, strEND);
}
});
//payment method
Expand Down Expand Up @@ -339,18 +353,6 @@ public void run()



//DepartTimes
GridPane right = new GridPane();
Label lb1 = new Label("Depart Times: "
+ " ");
TextArea times = new TextArea();
times.setEditable(false);
times.setPrefHeight(300);
times.setPrefWidth(30);
times.setText("//Times will be here");
right.add(lb1, 0, 0);
right.add(times, 0, 1);


BorderPane bp = new BorderPane();
bp.setBackground(new Background(OrangeBG));
Expand Down

0 comments on commit 9bfe602

Please sign in to comment.