Spring Tips: JavaFX

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024

ความคิดเห็น • 55

  • @gerdsfargen6687
    @gerdsfargen6687 11 หลายเดือนก่อน +1

    This is incredible. I've only used the Intellij based video tutorial on integrating both spreingboot and JavaFX...this is a bonus! Thanks so much for your teaching 😊

  • @MarwanAmeen89
    @MarwanAmeen89 5 ปีที่แล้ว +13

    I used spring boot with JavaFX and I was so freaking amazed.

  • @emmanueldamour1521
    @emmanueldamour1521 6 หลายเดือนก่อน +1

    Thank you so much this tutorial saved my life. Much thanks

  • @nito__moreno
    @nito__moreno 3 ปีที่แล้ว

    Oldie but goldie. Thanks.

  • @husseindarwich4836
    @husseindarwich4836 19 วันที่ผ่านมา

    Great stuff here, thanks a lot !!

  • @lenachernyak4639
    @lenachernyak4639 4 ปีที่แล้ว

    The best and the easiest explanition.Thank you

  • @delsix1222
    @delsix1222 9 หลายเดือนก่อน

    Thanks a lot. Very useful and such a clear explanation

  • @TheLinuxExpert
    @TheLinuxExpert 3 หลายเดือนก่อน

    Worked like a song. Thanks :-)

  • @dasampharos9845
    @dasampharos9845 5 ปีที่แล้ว +2

    Something that would be a great follow up to this that I'm having a difficult time with now is how to test JavaFX Spring applications. I know TestFX exists, but it doesn't "just" work with @SpringBootTest

  • @jonassilvag.4354
    @jonassilvag.4354 4 ปีที่แล้ว

    Amazing tutorial, ty very much!

  • @javasoccernut
    @javasoccernut 5 ปีที่แล้ว +1

    I used spring dm in a couple of large eclipse rcp apps

  • @BeautifulTurkish
    @BeautifulTurkish 2 ปีที่แล้ว +1

    Where do you use reactive-web dependency?

  • @nickoskordas9247
    @nickoskordas9247 2 ปีที่แล้ว +3

    Great video, but if I want to switch stages (load another fxml on button click) how can I do it? (I'm trying to do a login system, to switch between login screen and main screen)

    • @blackandyelllow5891
      @blackandyelllow5891 2 ปีที่แล้ว

      Did you find the answer of the question? Help would be much appreciated

    • @nickoskordas9247
      @nickoskordas9247 2 ปีที่แล้ว +5

      @@blackandyelllow5891 Yes I did. I just created a setter for the ApplicationContext in the main window controller and I called it from the login controller in the login method. You also need to do that if you use a logout etc. It's probably not the cleanest way but it does work. Example below
      ---- LOGIN METHOD CODE ---
      @FXML
      public void login(ActionEvent event) throws IOException, NoSuchAlgorithmException {
      if (!tfemail.getText().isEmpty() && !pf_pass.getText().isEmpty()) {
      String email = tfemail.getText();
      String pass = getMD5(pf_pass.getText());
      userService = ac.getBean(UserService.class);
      if(userService.authenticate(email, pass)){
      Notary not= userService.findByEmail(email);
      long id=not.getCode();
      ((Node)event.getSource()).getScene().getWindow().hide();
      FXMLLoader loader=new FXMLLoader(getClass().getResource("/home.fxml"));
      Pane root = loader.load();
      Home home = loader.getController();
      home.setAc(ac);
      home.setCode(id);
      Stage rgstage=new Stage();
      Scene scene=new Scene(root);
      rgstage.setTitle("iNotary");
      rgstage.setScene(scene);
      rgstage.show();
      ...
      ______________________________________
      ----FROM MAIN CONTROLLER_________
      private ApplicationContext ac;
      public void setAc(ApplicationContext ac) {
      this.ac = ac;
      }

    • @LiamTheCC
      @LiamTheCC ปีที่แล้ว +1

      @@nickoskordas9247 Thank you for posting this. Was having the same issue.

    • @gerdsfargen6687
      @gerdsfargen6687 11 หลายเดือนก่อน

      ​@nickoskordas9247 you the man! 😊

    • @gerdsfargen6687
      @gerdsfargen6687 11 หลายเดือนก่อน

      ​@@nickoskordas9247 thelo na se efharistiso!

  • @chliu
    @chliu 5 ปีที่แล้ว

    this is awesome, thanks...

  • @linsspinho1
    @linsspinho1 2 ปีที่แล้ว

    Thats nice!! BUT what about mapping entities as javafx uses beans properties! Spring will recognize that????

  • @oneshappapp4944
    @oneshappapp4944 4 ปีที่แล้ว +1

    Thank you for this content. Question, how would i go about calling and hiding other UI's?

    • @strohkoenig
      @strohkoenig 3 ปีที่แล้ว +1

      You'd let Spring inject the applicationContext into your Controller and push a new StageReadyEvent to it. The event's constructor is not being called with the primaryStage, but with a simple new Stage() as argument instead.

  • @phill13able
    @phill13able ปีที่แล้ว

    I keep getting this weird error which says the modena.css isn't found

  • @freddygamboa3581
    @freddygamboa3581 4 ปีที่แล้ว

    Wooooo !!!!

  • @zeljkosh
    @zeljkosh 5 ปีที่แล้ว +2

    Just a quick question if you could answer, would it be possible to use javafx and spring boot but without FXML ? all UI would be done in javafx code

    • @bonammanikanta6682
      @bonammanikanta6682 4 ปีที่แล้ว

      Not possible

    • @gerdsfargen6687
      @gerdsfargen6687 11 หลายเดือนก่อน

      ​@@bonammanikanta6682I came to this in 2023. Is there no possible way to do this ...as you could simply add the code into a StageInitializer Class could you not?

  • @ΚώσταςΔημητριάδης-μ9φ
    @ΚώσταςΔημητριάδης-μ9φ 4 ปีที่แล้ว +1

    I have successfully ran the app, but i can't find a way to properly go to another fxml - i get a java.lang.nullpointerexception. Thing is that it always gives the error when i run a method inside the controller. As i made my research, i found out that spring must manage the controller for the fxml. But i cant find a way to do that. Only the first fxml that will get loaded works well with it's controller. @SpringDeveloper could you help me on that please?

    • @ΚώσταςΔημητριάδης-μ9φ
      @ΚώσταςΔημητριάδης-μ9φ 4 ปีที่แล้ว +1

      When i had my previous app without spring, i had a class "browser", and by using an instance of this browser class i was getting the stage and i was setting another scene using another fxml.

  • @siddharthasharma2240
    @siddharthasharma2240 3 ปีที่แล้ว

    Can anyone help or spring developer With this example ,actually I configured spring JDBC template in same as we do in web application but It gives null in StageListner. How to do it? If possible please show add one video spring JDBC with this example at least..

  • @zeegleradventures0924
    @zeegleradventures0924 4 ปีที่แล้ว +1

    Do you have github Repo for this? I tried it but get some errors after coding your tutorial.

  • @TimK_Official
    @TimK_Official 4 ปีที่แล้ว

    I have repeated all lines of code in video and Spring Boot dont want to show stage frame :\

  • @stressfreezoneukandahuru1657
    @stressfreezoneukandahuru1657 5 ปีที่แล้ว

    Nice

  • @Zurenio
    @Zurenio 3 ปีที่แล้ว +1

    OK... you are a very good programmer. But try to mix Spring Boot with JavaFX is absolutly INSANE...!!

  • @geliangzhu9136
    @geliangzhu9136 5 ปีที่แล้ว

    how to connect mysql (spring+javafx+mysql)

    • @DystopianSnowman
      @DystopianSnowman 5 ปีที่แล้ว +1

      The same way as you'd do it usually with Spring: add Spring Data & JDBC dependencies, configure it in your application properties. Done. Every tutorial about it still apply in this scenario.

    • @sudhik4013
      @sudhik4013 4 ปีที่แล้ว +1

      It's only working in Fist controller.. It not working in second controller throws the null pointer exception

  • @batatarugal
    @batatarugal 2 ปีที่แล้ว

    You could left the source code for us.

  • @vincentmax4571
    @vincentmax4571 5 ปีที่แล้ว

    1st like 👍

  • @rosshoyt2030
    @rosshoyt2030 5 ปีที่แล้ว

    😋

  • @mambisizempare9671
    @mambisizempare9671 5 ปีที่แล้ว

    Javafx 2019 lol

    • @davidsalleyezonme1283
      @davidsalleyezonme1283 5 ปีที่แล้ว

      There is something bad use it?!

    • @kotivideos7140
      @kotivideos7140 5 ปีที่แล้ว

      @@davidsalleyezonme1283 its dead, you have electronJS for desktop and soon flutter for desktop too

    • @evko9264
      @evko9264 5 ปีที่แล้ว +8

      @@kotivideos7140 and you instantly start to suffer with all this some kinda Apps...like skype and so on...because in one day js devs think that they could implement backend)

    • @kotivideos7140
      @kotivideos7140 5 ปีที่แล้ว

      @@evko9264 flutter is not js it will take over soon

    • @SergiuszRoszczyk
      @SergiuszRoszczyk 5 ปีที่แล้ว

      Koti Crypto how mobile framework will take over desktop app? (Migration from desktop to mobile excluded)