Change your Application background in Scene Builder || JavaFX FXML Tutorial

It's a good idea to change your JavaFX FXML application's background to enhance the interactivity of your application with the users and your application also looks good as well as professional.

You can change your application background in two different ways first is, you can change your application's background color and second is you can change your background with a good and perfect image which can be your application's logo or any other.

This tutorial is a complete guide to change your JavaFX FXML application's background with an image in scene builder.

There are some steps to follow
  • Copy your image which you want as your applications' background to source folder in NetBeans or any other ide which you are using by right-clicking on the source folder as shown in the screenshot. But make sure your image has extension .JPEG.
paste the background image in project directory
  • Now make a new CSS file by right-clicking on the source folder and give it some name, I have given it name background but you can give any of your own choices.
make a new css file
  • Paste the code given below in your CSS file you have created and save this file. Write your image name in url with extension in your code in my case my background image name is itachay, So I have written in url section itechay.jpg but you have to use your image name with extension.
-fx-background-image: url('itachay.jpg');
-fx-background-size: 100% 100%;
  • Now go to scene builder and select pane you want to change the background. I have selected the main anchor pane but you can select any pane and change its background.
select the pane you want to change the background
  • Go to the properties section and select the CSS Stylesheet you have created in step 2.
go to the properties of selected pane and add css file you have created
  • Now select Style class just as.
now select css file
Its time to run your application and your background have been changed in a professional manner.

Now my application looks like
after changing background my application looks like


  1. Everything is perfect with this work. The writer has managed to keep the article interesting while discussing some really serious points. This is not easily done. All the best.
    Project Management Assignment

    1. IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes. IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble.Final Year Projects for CSE

      Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining .

      Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

      The Angular Training covers a wide range of topics including Angular Directives, Angular Services, and Angular programmability.Angular Training

  2. I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. spicewood custom pool builder

  3. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. website

  4. hey talked with four unique specialists to sell their home lastly settled on the person who consented to sell their home for what they needed to sell it for. zip code 90265

  5. Not all information found online is created equal and it's easy to get pushed and pulled in the wrong direction. To help you cut through all the clutter, I scoured the internet and found the top 10 timeless SEO quotes to guide your strategy. Even if Google unleashes an update tomorrow, these quotes will still hold true. web hosting cheap

  6. In this case you will begin it is important, it again produces a web site a strong significant internet site: Calgary Roofer