diff --git a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java index 5fbdbf5..e252877 100644 --- a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java +++ b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientUI.java @@ -6,15 +6,32 @@ import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.stage.Stage; +/** + * Class in charge of initializing and loading elements needed for the GUI. + * Also Launching the chat window with pre-given parameters + */ public class ClientUI extends Application { private final ClientMessageList clientMessageList = new ClientMessageList(); private final ClientConnectionHandler connectionHandler = new ClientConnectionHandler(clientMessageList); + /** + * Start method will only run the chatWindow method. + * + * @param primaryStage the primary stage for this application, onto which + * the application scene can be set. + * Applications may create other stages, if needed, but they will not be + * primary stages. + */ @Override public void start(Stage primaryStage) { chatWindow(primaryStage); } + /** + * Method is in charge of loading the FXML file and then initializing the controllers and setting some parameters for the stage. + * + * @param primaryStage of the Application onto which the Scene is set. + */ private void chatWindow(Stage primaryStage) { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("ChatWindow.fxml"));