Skip to content

Update java to 11 with maven #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ This project uses a number of libraries:

**You can also check out a [Java Swing](https://github.com/k33ptoo/School-Management-System-Inspiration) version if you are interested or Watch the full video [here](https://youtu.be/YuiXnPefmhU).
**

## Develop

run with

```shell
mvn javafx:run
```
102 changes: 102 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>groupId</groupId>
<artifactId>School-Management-System-JavaFX</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
<!-- <dependency>-->
<!-- <groupId>com.calendarfx</groupId>-->
<!-- <artifactId>calendar</artifactId>-->
<!-- <version>8.6.1</version>-->
<!-- </dependency>-->
<!-- https://mavenlibs.com/maven/pom/com.calendarfx/calendar -->
<!-- https://mvnrepository.com/artifact/com.calendarfx/view -->
<dependency>
<groupId>com.calendarfx</groupId>
<artifactId>view</artifactId>
<version>11.8.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.calendarfx/recurrence -->
<dependency>
<groupId>com.calendarfx</groupId>
<artifactId>recurrence</artifactId>
<version>11.6.1</version>
</dependency>

<!-- <dependency>-->
<!-- <groupId>com.calendarfx</groupId>-->
<!-- <artifactId>calendar</artifactId>-->
<!-- <version>11.8.3</version>-->
<!-- </dependency>-->

<!-- https://mvnrepository.com/artifact/com.calendarfx/calendar -->
<!-- <dependency>-->
<!-- <groupId>com.calendarfx</groupId>-->
<!-- <artifactId>calendar</artifactId>-->
<!-- <version>11.10.5</version>-->
<!-- </dependency>-->


<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>14</version>
</dependency>

<dependency>
<groupId>de.jensd</groupId>
<artifactId>fontawesomefx-materialdesignfont</artifactId>
<version>2.0.26-9.1.2</version>
</dependency>
<dependency>
<groupId>de.jensd</groupId>
<artifactId>fontawesomefx-commons</artifactId>
<version>9.1.2</version>
</dependency>

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>14</version>
</dependency>

<dependency>
<groupId>de.jensd</groupId>
<artifactId>fontawesomefx-fontawesome</artifactId>
<version>4.7.0-9.1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<configuration>
<mainClass>home.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>


</project>
11 changes: 8 additions & 3 deletions src/home/Main.java → src/main/java/home/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import jfxtras.styles.jmetro8.JMetro;

import java.net.URL;
//import jfxtras.styles.jmetro8.JMetro;

public class Main extends Application {

@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("fxml/Home.fxml"));
URL home = getClass().getResource("/fxml/Home.fxml");
assert home != null;
System.out.println(home);
Parent root = FXMLLoader.load(home);
primaryStage.setTitle("KeepToo SMSys");
primaryStage.getIcons().add(new Image("/home/icons/icon.png"));
primaryStage.getIcons().add(new Image("/icons/icon.png"));
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public class Controller implements Initializable {
@FXML
private void handleButtonClicks(javafx.event.ActionEvent mouseEvent) {
if (mouseEvent.getSource() == btnDashboard) {
loadStage("/home/fxml/Dashboard.fxml");
loadStage("/fxml/Dashboard.fxml");
} else if (mouseEvent.getSource() == btnStudents) {
loadStage("/home/fxml/Students.fxml");
loadStage("/fxml/Students.fxml");
} else if (mouseEvent.getSource() == btn_Timetable) {
loadStage("/home/fxml/Timetable.fxml");
loadStage("/fxml/Timetable.fxml");
}
}

Expand All @@ -55,7 +55,7 @@ private void loadStage(String fxml) {
Parent root = FXMLLoader.load(getClass().getResource(fxml));
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.getIcons().add(new Image("/home/icons/icon.png"));
stage.getIcons().add(new Image("/icons/icon.png"));
stage.initModality(Modality.APPLICATION_MODAL);
stage.show();
} catch (IOException e) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes