Skip to content

Commit 70471fe

Browse files
committed
Location Label
Created a label that also displays where the Extracted Text.docx file was saved to just in case.
1 parent a1c28a3 commit 70471fe

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

Extracted Text.docx

0 Bytes
Binary file not shown.

src/view/Main.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public void start(Stage primaryStage) {
7474

7575
Label docLabel = new Label("Highlighted Document");
7676
Label completeLabel = new Label("Transfer Completed!");
77+
Label location = new Label(System.getProperty("user.dir") + "\\Extracted Text.docx");
78+
location.setVisible(false);
7779
completeLabel.setVisible(false);
7880

7981
TextField docField = new TextField();
@@ -94,6 +96,7 @@ public void start(Stage primaryStage) {
9496
start.setOnAction(e -> {
9597
if (this.processDocuments(docField.getText())) {
9698
completeLabel.setVisible(true);
99+
location.setVisible(true);
97100
}
98101
});
99102

@@ -102,6 +105,7 @@ public void start(Stage primaryStage) {
102105
reset.setOnAction(e -> {
103106
docField.setText("");
104107
completeLabel.setVisible(false);
108+
location.setVisible(false);
105109
});
106110

107111
// Create the button box to add the start/reset buttons to
@@ -148,13 +152,15 @@ public void start(Stage primaryStage) {
148152
Label infoLabel = new Label("Brenton Haliw | github.com/bjhaliw");
149153
info.getChildren().addAll(infoLabel);
150154

151-
box.getChildren().addAll(title, msg, msg2, empty, filepathBox, buttonBox, completeLabel, info);
155+
box.getChildren().addAll(title, msg, msg2, empty, filepathBox, buttonBox, completeLabel, location, info);
152156
Scene scene = new Scene(box);
153157

154158
primaryStage.setScene(scene);
155159
primaryStage.setTitle("Word Transfer Tool");
156160
primaryStage.getScene().getRoot().setStyle("-fx-base:gainsboro");
157161
primaryStage.show();
162+
163+
primaryStage.setOnCloseRequest(e -> System.exit(0));
158164
}
159165

160166
/**

~$tracted Text.docx

-162 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)