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.
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!
@@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 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...
@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.
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!
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 ?
@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!
@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
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"
@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!
@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 - 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!
@@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...
@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!
@@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
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.
man, your JavaFX tutorials are the cleanest tutorials here in yt, really helped me a lot
That is very kind of you to say! Glad that my videos are helpful!
I know it's quite randomly asking but do anyone know of a good website to watch newly released movies online ?
@Victor Derrick flixportal :P
@Ahmir Nolan Thank you, signed up and it seems like they got a lot of movies there =) I really appreciate it !!
@Victor Derrick happy to help xD
You know he's Canadian when he thanks you every five minutes.
Anyhow great video Dave
@Parsa - Thanks! 😉 Happy that you found it useful! Cheers!
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!
Very valuable channel, thanks for this tutorial and for showing caspian's and modena's location!
@The Dev - Thank you for the kind words! Glad you found it useful! Cheers!
Thanks for the tutorial! I usually don’t comment, but that was a very helpful and totally understandable video!
Glad it was helpful! I really appreciate you taking the time to comment! Thank you!
i didnt know you can use css with java-fx
thanks for this tutorial! now i can make modern gui very easily!!!
@Rajit Gupta - You are welcome! Glad I could help!
Your JavaFX CSS tutorial is clear and helped me a lot. thank you very much for sharing!!!
You’re welcome! Glad it helped!
@@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?
@Ricardo - Hard to say with certainty without seeing your code. Have you used the "setPreferredSize" method on any of your components?
@@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...
@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.
Wow. Great Content.
@Kavishka Madhudhan - Thank you! 🙏 Glad you liked it! Cheers!
@@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 ?
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!
@@JavaCodeJunkie Thank you very much for your support sir. I will try it.
You are very welcome! Good luck!
Great Tutorial!
@Hinrik Könnecker - Thank you! I am glad you found it useful! Cheers!
Thank you so much....
@VEDANT - You're most welcome! Cheers!
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 ?
@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!
How would you change the fonts used in an alert box? I have been searching and cannot seem to find anything that works?
@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
Hi! I'm trying to make responsive designs in JavaFX for large screens and small. with fxml and css. so any possiblities.
@Suleiman Gaming - Are you asking for suggestions on what you should do and what to avoid?
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"
@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!
@@JavaCodeJunkie
Merci beaucoup, thank you very much. You've solved my problem! :)
@Jamil B - You're welcome! Glad to help! 😃
nice tutorial mate but i wont to know how i can change the default Blue border of TextField exp i want it red
@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
.com.sun.javafx.css.StyleManager loadStylesheetUnprivileged
WARNING: Resource stylesheet.css not found
Can someone help me i get this error..
@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!
@@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...
@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!
@@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
WARNING: Resource "/application/stylesheet.css" not found.