Added javafx part to main client test, instructions are in comments in the code
This commit is contained in:
@@ -8,9 +8,9 @@
|
|||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
@@ -23,5 +23,6 @@
|
|||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="lib" path="OOPP 43 In the beginning there was_/src/Main.java"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "CodeLens (Launch) - Main",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "Main",
|
||||||
|
"projectName": "OOP-Project"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,60 @@
|
|||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
//MAIN CLIENT
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
|
|
||||||
System.out.print("Hello World!");
|
System.out.print("Hello World!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//COMMENT THE "MAIN CLIENT" PART OUT AND UNCOMMENT THE "JAVAFX" PART TO TEST IF JAVAFX WORKS
|
||||||
|
//Don't uncomment the imports pls :)
|
||||||
|
|
||||||
|
//JAVAFX
|
||||||
|
|
||||||
|
//public class Main extends Application {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void start(Stage primaryStage) {
|
||||||
|
// Button btn = new Button();
|
||||||
|
// btn.setText("Say 'Hello World'");
|
||||||
|
// btn.setOnAction(new EventHandler<ActionEvent>() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void handle(ActionEvent event) {
|
||||||
|
// System.out.println("Hello World!");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// Button btn2 = new Button();
|
||||||
|
// btn2.setText("Say something else!");
|
||||||
|
// btn2.setOnAction(new EventHandler<ActionEvent>() {
|
||||||
|
// @Override
|
||||||
|
// public void handle(ActionEvent event) {
|
||||||
|
// System.out.println("something else!");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// StackPane root = new StackPane();
|
||||||
|
// //apparently root.getchildren.add does the same as document.ready in javascript
|
||||||
|
// root.getChildren().add(btn);
|
||||||
|
//
|
||||||
|
// Scene scene = new Scene(root, 500, 250);
|
||||||
|
//
|
||||||
|
// primaryStage.setTitle("Hello World!");
|
||||||
|
// primaryStage.setScene(scene);
|
||||||
|
// primaryStage.show();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public static void main(String[] args) {
|
||||||
|
// launch(args);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|||||||
Reference in New Issue
Block a user