Spring Tips: JavaFX

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 55

  • @gerdsfargen6687
    @gerdsfargen6687 Рік тому +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.

  • @nito__moreno
    @nito__moreno 3 роки тому

    Oldie but goldie. Thanks.

  • @emmanueldamour1521
    @emmanueldamour1521 7 місяців тому +1

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

  • @husseindarwich4836
    @husseindarwich4836 Місяць тому

    Great stuff here, thanks a lot !!

  • @delsix1222
    @delsix1222 10 місяців тому

    Thanks a lot. Very useful and such a clear explanation

  • @TheLinuxExpert
    @TheLinuxExpert 4 місяці тому

    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

  • @lenachernyak4639
    @lenachernyak4639 4 роки тому

    The best and the easiest explanition.Thank you

  • @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?

  • @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.

  • @linsspinho1
    @linsspinho1 2 роки тому

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

  • @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 2 роки тому +1

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

    • @gerdsfargen6687
      @gerdsfargen6687 Рік тому

      ​@nickoskordas9247 you the man! 😊

    • @gerdsfargen6687
      @gerdsfargen6687 Рік тому

      ​@@nickoskordas9247 thelo na se efharistiso!

  • @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 Рік тому

      ​@@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?

  • @jonassilvag.4354
    @jonassilvag.4354 4 роки тому

    Amazing tutorial, ty very much!

  • @zeegleradventures0924
    @zeegleradventures0924 4 роки тому +1

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

  • @ΚώσταςΔημητριάδης-μ9φ

    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.

  • @freddygamboa3581
    @freddygamboa3581 4 роки тому

    Wooooo !!!!

  • @chliu
    @chliu 5 років тому

    this is awesome, thanks...

  • @phill13able
    @phill13able Рік тому

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

  • @TimK_Official
    @TimK_Official 5 років тому

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

  • @Zurenio
    @Zurenio 3 роки тому +1

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

  • @stressfreezoneukandahuru1657
    @stressfreezoneukandahuru1657 5 років тому

    Nice

  • @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..

  • @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

  • @rosshoyt2030
    @rosshoyt2030 5 років тому

    😋

  • @batatarugal
    @batatarugal 2 роки тому

    You could left the source code for us.

  • @vincentmax4571
    @vincentmax4571 5 років тому

    1st like 👍

  • @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)