Skip to content

Commit

Permalink
Login GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sciaopersone committed Feb 22, 2024
1 parent b2672e4 commit 4b465ab
Showing 5 changed files with 14 additions and 38 deletions.
17 changes: 0 additions & 17 deletions .idea/runConfigurations/HelloApplication.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

public class HelloApplication extends Application {
@@ -20,4 +19,5 @@ public void start(@org.jetbrains.annotations.NotNull Stage stage) throws IOExcep
public static void main(String[] args) {
launch();
}

}
15 changes: 11 additions & 4 deletions src/main/java/team/elrant/bubbles/gui/HelloController.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package team.elrant.bubbles.gui;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import team.elrant.bubbles.xmpp.ConnectedUser;

public class HelloController {
@FXML
private Label welcomeText;
private TextField username_field;
@FXML
private PasswordField password_field;

@FXML
protected void onHelloButtonClick() {
welcomeText.setText("Welcome to JavaFX Application!");
protected void onSubmitButtonClick() {
ConnectedUser user = new ConnectedUser(username_field.getText(), password_field.getText(), "elrant.team");
user.initializeConnection();
user.disconnect();
System.exit(0);
}
}
4 changes: 2 additions & 2 deletions src/main/java/team/elrant/bubbles/xmpp/SimpleXMPPClient.java
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ public class SimpleXMPPClient {
public static void main(String[] args) {

// XMPP connection details
String username = "";
String password = "";
String username = "username";
String password = "password";
String serviceName = "elrant.team";

ConnectedUser user = new ConnectedUser(username, password, serviceName);
14 changes: 0 additions & 14 deletions src/main/resources/team/elrant/bubbles/gui/hello-view.fxml

This file was deleted.

0 comments on commit 4b465ab

Please sign in to comment.