From 48a8902a520818c83f094e3107a4a0c5bc71c407 Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Tue, 29 Oct 2024 09:46:04 +0100 Subject: [PATCH] Anchorpane --- Code/Steiner/uefa_uebung/bin/App.class | Bin 562 -> 560 bytes Code/Steiner/uefa_uebung/src/App.java | 2 +- .../src/main/java/com/example/App.java | 36 +++++++++----- .../target/classes/com/example/App.class | Bin 0 -> 2628 bytes .../classes/com/example/SystemInfo.class | Bin 0 -> 561 bytes .../target/classes/module-info.class | Bin 0 -> 200 bytes Code/ost/_05_layouts/pom.xml | 46 ++++++++++++++++++ .../src/main/java/com/example/App.java | 44 +++++++++++++++++ .../src/main/java/com/example/SystemInfo.java | 13 +++++ .../src/main/java/module-info.java | 4 ++ .../target/classes/com/example/App.class | Bin 0 -> 1714 bytes .../classes/com/example/SystemInfo.class | Bin 0 -> 561 bytes .../target/classes/module-info.class | Bin 0 -> 200 bytes 13 files changed, 133 insertions(+), 12 deletions(-) create mode 100644 Code/ost/_04_several_scenes/target/classes/com/example/App.class create mode 100644 Code/ost/_04_several_scenes/target/classes/com/example/SystemInfo.class create mode 100644 Code/ost/_04_several_scenes/target/classes/module-info.class create mode 100644 Code/ost/_05_layouts/pom.xml create mode 100644 Code/ost/_05_layouts/src/main/java/com/example/App.java create mode 100644 Code/ost/_05_layouts/src/main/java/com/example/SystemInfo.java create mode 100644 Code/ost/_05_layouts/src/main/java/module-info.java create mode 100644 Code/ost/_05_layouts/target/classes/com/example/App.class create mode 100644 Code/ost/_05_layouts/target/classes/com/example/SystemInfo.class create mode 100644 Code/ost/_05_layouts/target/classes/module-info.class diff --git a/Code/Steiner/uefa_uebung/bin/App.class b/Code/Steiner/uefa_uebung/bin/App.class index baa6c6726ecc7ff0468f1be52445c21d3cbd1d3d..3c907fcab077583b013ac22341c514d0eb0d911f 100644 GIT binary patch delta 359 zcmah^y-EW?7@R#%bGM#Gqly2prtt?M2-+xCViB+l3Rbe_mgLN4FKm`0R(XcQ2T^PU z1?_z(@iQqz5Nw7SX1-y*C;!psAD=I808X%;^TS~QAw%(2X0oQGY1PiGO>KZ_hU*Js zRX^34ibXT+_7W{!k{Z#o>5W$1Bf-PQopEv?)c1`b%cUJ!j9q(M`b;XwQhssuf6^6}!2i*_Y{_p@3 zVDun=MQ~N(&xqbhc_SjDk1lW21uuN5?shWt#S1+7DC&Lr}Dc7VTQJ2!vX+8fXw>bYh%>HhB%=jg*Um z7F|HM(7i;Tx^Ph(IOjd@`<~~6^I{Dw^Y!!b37oRsGe^dd#&OAz?R^JQ?4L=c>o7;f zrYsch{72sl{dU8vKXsCzxH6-xiSa9O7+*!M$7*p@@eJ7e;AaH4+WWcNz2{J7Ck$j#rl|11Yx577mg zy?1i2DpDBTvm;ZOQtgfldgk@!FwKm%3aTwlX0cTrt24wn14_lkH stage.setScene(scene2)); + switchToScene1.setOnAction(e -> stage.setScene(scene1)); + + // Set initial scene and show the stage + stage.setScene(scene1); + stage.setTitle("Scene Switcher"); stage.show(); } public static void main(String[] args) { launch(); } - -} \ No newline at end of file +} diff --git a/Code/ost/_04_several_scenes/target/classes/com/example/App.class b/Code/ost/_04_several_scenes/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..6af1eda426bd04b509050df1505271fe61cb2c92 GIT binary patch literal 2628 zcmbVNS#ujj5dOxNw6eU!Mpm52xnyt>pAk+%0(K5x2?@wfh>U^~uCY9pHd*b8-IWg@ z;XWTI-g$>dpo-XFSNH)Gzlow}R>vxK9KFX^`O12lS1P7a;GSVya<4vSh`0q|iE)NRrgl^ambMkpRHigZ>!Cx>zx5)6GUQ5I~=b8Iu6;Y-4dqL-oPwlE1= zq&z#Na!8H$$Iyd=GR!2yejhw-a;r$lj$suQ^dW{rdqU4tJbP7m3^^^UC{8?vRhkxw)ZS2N=%l2qO~3%T%MhT}{z$%Cgr|hE=2bbbl07 z$Xz^*OY4g|Q4oof*ULJlFinywacfyBWoB@f92ztPB~V`!s}xrHihN#E5R!#H%<7oK z6^2e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+ UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + com.example.App + + + + + + + diff --git a/Code/ost/_05_layouts/src/main/java/com/example/App.java b/Code/ost/_05_layouts/src/main/java/com/example/App.java new file mode 100644 index 0000000..4419fa3 --- /dev/null +++ b/Code/ost/_05_layouts/src/main/java/com/example/App.java @@ -0,0 +1,44 @@ +package com.example; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.layout.AnchorPane; +import javafx.stage.Stage; + +/** + * JavaFX App with AnchorPane layout + */ +public class App extends Application { + + @Override + public void start(Stage stage) { + // Create AnchorPane + AnchorPane anchorPane = new AnchorPane(); + + // Create Controll button + Button controlButton = new Button("Button"); + AnchorPane.setTopAnchor(controlButton, 50.0); + AnchorPane.setLeftAnchor(controlButton, 50.0); + AnchorPane.setRightAnchor(controlButton, 10.0); + AnchorPane.setBottomAnchor(controlButton, 10.0); + + // Create Button 1 + Button button1 = new Button("Button 1"); + AnchorPane.setTopAnchor(button1, 10.0); + AnchorPane.setLeftAnchor(button1, 10.0); + + // Add buttons to the pane + anchorPane.getChildren().addAll(controlButton, button1); + + // Set up the Scene with AnchorPane + Scene scene = new Scene(anchorPane, 640, 480); + stage.setTitle("Hauptfenster with AnchorPane"); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } +} diff --git a/Code/ost/_05_layouts/src/main/java/com/example/SystemInfo.java b/Code/ost/_05_layouts/src/main/java/com/example/SystemInfo.java new file mode 100644 index 0000000..b566a3e --- /dev/null +++ b/Code/ost/_05_layouts/src/main/java/com/example/SystemInfo.java @@ -0,0 +1,13 @@ +package com.example; + +public class SystemInfo { + + public static String javaVersion() { + return System.getProperty("java.version"); + } + + public static String javafxVersion() { + return System.getProperty("javafx.version"); + } + +} \ No newline at end of file diff --git a/Code/ost/_05_layouts/src/main/java/module-info.java b/Code/ost/_05_layouts/src/main/java/module-info.java new file mode 100644 index 0000000..5918012 --- /dev/null +++ b/Code/ost/_05_layouts/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module com.example { + requires javafx.controls; + exports com.example; +} diff --git a/Code/ost/_05_layouts/target/classes/com/example/App.class b/Code/ost/_05_layouts/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..f1197e9ad8e5c03be29675420bb1b0cc3b95f483 GIT binary patch literal 1714 zcmZ`(TT|Oc6#f=pB#bCv41|QFkOZ(}h)OR>i&J6(Nt4DgG^S3S^pdr_w#CSjN0v$Y z(wTPp(3#Hkq5UO&0a_;g0sT>(o|Sw}T0QI@ojv>QIp4Yb{m-9&0l0}n1tSa-hSSi+ zOWtT&Lf>vS6@(cs9r7byeW~+i(=rY2nT{>bx-vubmT8;b7DFhRDl&w3oQjAcgi#F< zLl!bf1%a&k>=NyAuMedsNzoQI$b+g4Vm3z&J3`3;lao1y*OXfPxkfJ8^ zf?PAHqJpWupDjb!Lbv$0PTSMBZKLkE``jjvCNZiY!Em9A;Tsx`?YWMn-)VcEW2=~@ zfC4#&X`GWW%rndcFB7a?qi0>yuF<>E>;qztz8EgzZ3UMYCM9@aw(GPhIt`0hVo;8_ z)fRhI3ALN@!x*&6NcXO2xQb;4ttGqzry2OpknBh8dz>eJGjAfKiV|a0LsDXl6Gl!{ zy#OSdz1nqj5^EaPrO8`l^4P4^J2vvRuHhYdG(ksq93rF<+*k1~gBsAXxFIdy*YE*u zFpSlNw^KK*iYsh}* zl?gUIi;D6g_BDKl$AQv!Zm7=vjQeV;H)(#L;d9wl;a1&w5wu24FeLt~GZN zFOM%t3KP;4zQWhU_9(u=^MEwmpj|SqhF*c6!svS%BOD-2H?Iv4ucC??=^5&@j==mE D=^d1^ literal 0 HcmV?d00001 diff --git a/Code/ost/_05_layouts/target/classes/com/example/SystemInfo.class b/Code/ost/_05_layouts/target/classes/com/example/SystemInfo.class new file mode 100644 index 0000000000000000000000000000000000000000..487f8e1ef68812d4c9105ba77a7d5fed29e78421 GIT binary patch literal 561 zcmZut%TB^j5Iw`IP>LWT;%niCfD5{GfpKGEV$!GyhJC3Qyo9!-6as&xD~$_3z>hM{ zZBaCKGjr$MbLPy<$LHHSfHNFxND=Ce@0wz1yVHpYse5PV|!tn6Wbe^ zw}Y{8LPG9bdNRBqq+9JiA#>?J2pwq@3}lfblr8Cro4Gp>!M#102tw8J9edKZ1F7mY zm-MfUM^6raZCVh`kYqhP-FugF4-l&_$Ho;JEXAu*1>|j?z?a%1(QU>bS zY>m*H|fPaX$^tr+^YCg?qX9ysDks;$eLQ+5;)C*Yg$ z-NBL6tvG62nVgAp_Vfk$XMUuhb5!4oTI6WN1kNR{3fMxK5hZR$Kg_OHUQvBwScu|~Xqt=)Yq1`Xk1LQs#iecmihA}3N8$>~7m