Working on sidebar menu UI.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package org.to.telegramfinalproject.UI;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
|
||||
public class SidebarMenuController {
|
||||
@FXML private ImageView profileImage;
|
||||
@FXML private Label usernameLabel;
|
||||
|
||||
@FXML private Button myProfileButton;
|
||||
@FXML private Button newGroupButton;
|
||||
@FXML private Button newChannelButton;
|
||||
@FXML private Button contactsButton;
|
||||
@FXML private Button savedMessagesButton;
|
||||
@FXML private Button settingsButton;
|
||||
@FXML private Button telegramFeaturesButton;
|
||||
@FXML private Button telegramQnAButton;
|
||||
|
||||
@FXML private ToggleButton nightModeToggle;
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
Image image = new Image(getClass().getResource("/org/to/telegramfinalproject/Images/profile.png").toExternalForm());
|
||||
profileImage.setImage(image);
|
||||
|
||||
// Called automatically after FXML is loaded
|
||||
usernameLabel.setText("Asal");
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,9 @@ public class TelegramApplication extends Application {
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(TelegramApplication.class.getResource("/org/to/telegramfinalproject/sidebar_menu.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 1480, 820);
|
||||
|
||||
scene.getStylesheets().add(getClass().getResource("/org/to/telegramfinalproject/CSS/sidebar_menu.css").toExternalForm());
|
||||
|
||||
stage.setTitle("Telegram");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
|
||||
Reference in New Issue
Block a user