Skip to content
Snippets Groups Projects
Commit e002db0c authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

lab02

parent ed4b8024
Branches
No related merge requests found
......@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>vsb-cs-java1</groupId>
<artifactId>lab01</artifactId>
<artifactId>lab02</artifactId>
<version>0.0.1-SNAPHOST</version>
<packaging>jar</packaging>
<properties>
......
package lab;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
......@@ -32,7 +31,7 @@ public class App extends Application {
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.resizableProperty().set(false);
primaryStage.setTitle("Java 1 - 1th laboratory");
primaryStage.setTitle("Java 1 - 2nd laboratory");
primaryStage.show();
//Exit program when main window is closed
......@@ -53,9 +52,11 @@ public class App extends Application {
private void drawScene() {
//graphic context is used for a painting
GraphicsContext gc = canvas.getGraphicsContext2D();
// put your code here
// gc.setFill(Color.AQUA);
// gc.setStroke(Color.BLACK);
int timeout = 200;
while (Routines.isEndOfThreadRequestedByJavaVM()) {
Routines.sleep(timeout);
double deltaT = timeout / 1000.;
}
}
private void exitProgram(WindowEvent evt) {
......
src/main/resources/lab/fireball-transparent.gif

412 KiB

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment