Master CSS in 5 Easy Steps | JavaFX GUI Tutorial for Beginners

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

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

  • @godfreyouma5877
    @godfreyouma5877 8 หลายเดือนก่อน +1

    I wish TH-cam has enabled attaching screenshots in the comment to show you my work while following your tutorial. It was indeed helpful and straight to the point.

  • @glennspencergalanido5427
    @glennspencergalanido5427 4 ปีที่แล้ว +9

    man, your JavaFX tutorials are the cleanest tutorials here in yt, really helped me a lot

    • @JavaCodeJunkie
      @JavaCodeJunkie  4 ปีที่แล้ว +2

      That is very kind of you to say! Glad that my videos are helpful!

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

      I know it's quite randomly asking but do anyone know of a good website to watch newly released movies online ?

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

      @Victor Derrick flixportal :P

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

      @Ahmir Nolan Thank you, signed up and it seems like they got a lot of movies there =) I really appreciate it !!

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

      @Victor Derrick happy to help xD

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

    You know he's Canadian when he thanks you every five minutes.
    Anyhow great video Dave

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

      @Parsa - Thanks! 😉 Happy that you found it useful! Cheers!

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

    Check out my latest video tutorial on JavaFX programming. My Apologies for the length but I couldn't make it any shorter and still do justice to the material! Please Like and Subscribe if you find the tutorial helpful. Stay safe and keep on coding!

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

    Very valuable channel, thanks for this tutorial and for showing caspian's and modena's location!

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

      @The Dev - Thank you for the kind words! Glad you found it useful! Cheers!

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

    Thanks for the tutorial! I usually don’t comment, but that was a very helpful and totally understandable video!

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

      Glad it was helpful! I really appreciate you taking the time to comment! Thank you!

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

    i didnt know you can use css with java-fx
    thanks for this tutorial! now i can make modern gui very easily!!!

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

      @Rajit Gupta - You are welcome! Glad I could help!

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

    Your JavaFX CSS tutorial is clear and helped me a lot. thank you very much for sharing!!!

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

      You’re welcome! Glad it helped!

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

      @@JavaCodeJunkie Hi Dave, I just concluded my application using few codes in css just to configure the TextArea it´s working perfectly in my computer but when I open the application in another computer the components of application seems have a distortion like it had not following the parameters that I configured in the application (ex. some buttons are smaller, text size that does not fit to the field...). Do you have any idea of why that is occuring?

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

      @Ricardo - Hard to say with certainty without seeing your code. Have you used the "setPreferredSize" method on any of your components?

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

      @@JavaCodeJunkie ​it´s an AnchorPane with components attached (button, textfield, labels and comboboxes). Then I added the AnchorPane to the Scene and then the Scene was added in the Stage. The AnchorPane and all components were set with prefSize or prefWidth. A have a picture from the app taken in 2 different computers if there´s a way I can share it...

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

      @Ricardo - The likely cause of your issues is setting preferred sizes on some/all of your components. Unless there is a good reason not to, it is best to let the layout panes and components do the sizing and arranging for you. That is what they get paid for! :) And, as you have seen, issues usually show up when you try to run your app on another computer with a different screen resolution that the one on which the app was developed.

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

    Wow. Great Content.

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

      @Kavishka Madhudhan - Thank you! 🙏 Glad you liked it! Cheers!

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

      @@JavaCodeJunkie sir, also I have a question. can you tell me how to change the color of the title bar and it's text color ?

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

      The Window TitleBar color is controlled by the look & feel of the underlying OS. Java does not provide an API to change it. You might try the following manual solution.
      www.intowindows.com/how-to-change-title-bar-color-in-windows-10/
      Cheers!

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

      @@JavaCodeJunkie Thank you very much for your support sir. I will try it.

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

      You are very welcome! Good luck!

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

    Great Tutorial!

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

      @Hinrik Könnecker - Thank you! I am glad you found it useful! Cheers!

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

    Thank you so much....

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

      @VEDANT - You're most welcome! Cheers!

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

    love your intro vid. great graphics. did you build it programmatically? nice and simple. comprehensive of the core idea. thank you again. What are the 5 steps listed ?

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

      @A B - Thank you for your kind words! No, I did not create the graphics programmatically. They are from a series of customizable templates from a company called VIDDYOZE.COM. I am glad that you found the video helpful. Cheers!

  • @SëriålHëålër23
    @SëriålHëålër23 3 ปีที่แล้ว +1

    How would you change the fonts used in an alert box? I have been searching and cannot seem to find anything that works?

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

      @JHester23 - Great question! You can change the Alert box Font (don't forget that the Alert is a Dialog) using Java code or by using CSS.
      Code Example
      Alert alert = new Alert(AlertType.CONFIRMATION);
      alert.setTitle("Confirmation Dialog");
      Label textLabel = new Label();
      textLabel.setFont(Font.font("Times New Roman", FontWeight.BOLD, 48));
      textLabel.setWrapText(false);
      textLabel.setText("Content Text");
      alert.getDialogPane().setContent(textLabel);
      alert.setResizable(true);
      alert.show();
      CSS Example
      See the answer in the following Stackoverflow post.
      stackoverflow.com/questions/28417140/styling-default-javafx-dialogs
      Hope this helps!
      Cheers,
      Dave

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

    Hi! I'm trying to make responsive designs in JavaFX for large screens and small. with fxml and css. so any possiblities.

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

      @Suleiman Gaming - Are you asking for suggestions on what you should do and what to avoid?

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

    Thank you very much. I still have a problem. Whenever I tried to write proper javafx-css in the stylesheet, I got these warnings
    Unknown property: "-fx-background-color"

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

      @Jamil B - Try adding the following file to your JavaFX User Library in Eclipse.
      org.eclipse.fx.ide.css.jfx8_3.5.0.201907240300.jar
      For me, the file was located in the C:\Users\David\.p2\pool\plugins folder.
      Cheers!

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

      @@JavaCodeJunkie
      Merci beaucoup, thank you very much. You've solved my problem! :)

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

      @Jamil B - You're welcome! Glad to help! 😃

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

    nice tutorial mate but i wont to know how i can change the default Blue border of TextField exp i want it red

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

      @yah chan - Thank you very much! The default style class for a TextField is "text-field". You can add an entry in the css file like the following:
      .text-field {
      -fx-border-color: RED;
      }
      Cheers!
      Dave

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

    .com.sun.javafx.css.StyleManager loadStylesheetUnprivileged
    WARNING: Resource stylesheet.css not found

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

      Can someone help me i get this error..

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

      @sixaj - Thanks for the question! Make sure that the file stylesheet.css is in that application package. If it is located somewhere else you will have to change the path/file name in the .add() method. Cheers!

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

      @@JavaCodeJunkie thanks I fixed it! Im watching your entire JavaFX playlist right now because it helps me by making my JavaFX school project. Your video's are very helpfull and enjoyable! So I need to subscribe!
      However I run into more errors because I think Java syntax maybe changed over the years. For example the .setContrains function I do not have...

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

      @sixaj - setConstraints is a static method of the GridPane class and is accessed with GridPane.setConstraints using the Class name and not the user created object name. I will help you work through any errors that you are experiencing ... just post a comment and let me know. Cheers!

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

      @@JavaCodeJunkie my project is going great thanks to your video's! I cant stop working on it😂
      I now understand a lot about javaFX and finished my UI. I just have to make a couple eventhandlers ect and then im done

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

    WARNING: Resource "/application/stylesheet.css" not found.