new semester here we go
This commit is contained in:
23
338/tmp/HelloFX.java
Normal file
23
338/tmp/HelloFX.java
Normal file
@@ -0,0 +1,23 @@
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class HelloFX extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) {
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String javafxVersion = System.getProperty("javafx.version");
|
||||
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
|
||||
Scene scene = new Scene(new StackPane(l), 640, 480);
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
|
||||
}
|
||||
1
338/tmp/make.sh
Normal file
1
338/tmp/make.sh
Normal file
@@ -0,0 +1 @@
|
||||
javac --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib $1 --add-modules javafx.controls
|
||||
14
338/tmp/makefile
Normal file
14
338/tmp/makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
cc=~/Downloads/jdk-11.0.2/bin/javac
|
||||
fxlib=--module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib
|
||||
ctrl=--add-modules javafx.controls
|
||||
|
||||
env=~/Downloads/jdk-11.0.2/bin/java
|
||||
cfile="adsf"
|
||||
|
||||
default: %.java
|
||||
# takes a java file as entry to build
|
||||
$(cc) $(fxlib) $< $(ctr)
|
||||
|
||||
# ouchie
|
||||
run:
|
||||
$(env) $(fxlib) $(ctrl) $(cfile)
|
||||
2
338/tmp/run.sh
Normal file
2
338/tmp/run.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
[ -z $1 ] && echo "no target" && exit 1
|
||||
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1
|
||||
23
338/tmp/temp.java
Normal file
23
338/tmp/temp.java
Normal file
@@ -0,0 +1,23 @@
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
/* */
|
||||
public class temp extends Application {
|
||||
// start application things
|
||||
@Override
|
||||
public void start(Stage stage) {
|
||||
// label for entry text box
|
||||
Label input_label = new Label("Farenheit: ");
|
||||
|
||||
// set up the X window
|
||||
Scene scene = new Scene(new StackPane(input_label), 640, 480);
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user