Skip to content

Commit fe34b03

Browse files
committed
Tweak GUI to be more suitable for usage
1 parent 1d254ed commit fe34b03

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

data/tasks.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
R|0|HI |14/10/1000|1
2-
R|0|Hi |14/10/1999|2
3-
D|0|HIi |10/10/1000
1+
R|0|Complete Homework |18/09/2021|2
2+
T|1|Submit Lab
3+
D|1|Study for Quiz |20/09/2021

docs/Ui.png

624 KB
Loading

src/main/java/duke/MainWindow.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class MainWindow extends AnchorPane {
2424
private Duke duke;
2525

2626
private Image userImage = new Image(this.getClass().getResourceAsStream("/images/user.jpeg"));
27-
private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/derp.png"));
27+
private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/derpy.png"));
2828

2929
@FXML
3030
public void initialize() {

src/main/resources/images/derp.png

-134 KB
Binary file not shown.

src/main/resources/images/derpy.png

35.2 KB
Loading

src/main/resources/view/MainWindow.fxml

+12-5
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,28 @@
33
<?import javafx.scene.control.Button?>
44
<?import javafx.scene.control.ScrollPane?>
55
<?import javafx.scene.control.TextField?>
6+
<?import javafx.scene.control.ToolBar?>
67
<?import javafx.scene.layout.AnchorPane?>
78
<?import javafx.scene.layout.VBox?>
89
<?import javafx.scene.text.Font?>
10+
<?import javafx.scene.text.Text?>
911

10-
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
12+
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="689.0" prefWidth="488.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
1113
<children>
12-
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" />
13-
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send">
14+
<Button fx:id="sendButton" layoutX="402.0" layoutY="647.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="86.0" text="Send">
1415
<font>
1516
<Font name="Arial" size="11.0" />
1617
</font></Button>
17-
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0">
18+
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" layoutY="27.0" prefHeight="618.0" prefWidth="488.0" vvalue="1.0">
1819
<content>
19-
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0" />
20+
<VBox fx:id="dialogContainer" prefHeight="620.0" prefWidth="482.0" />
2021
</content>
2122
</ScrollPane>
23+
<ToolBar prefHeight="27.0" prefWidth="488.0">
24+
<items>
25+
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Duke Batman" wrappingWidth="166.42333984375" />
26+
</items>
27+
</ToolBar>
28+
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="402.0" AnchorPane.bottomAnchor="1.0" />
2229
</children>
2330
</AnchorPane>

0 commit comments

Comments
 (0)