TornadoFX: Build JavaFX Applications with Kotlin

Video description

Get started with creating JavaFX applications using TornadoFX - A lightweight JavaFX framework for Kotlin

About This Video

  • Learn the differences between JavaFX using Java and JavaFX using TornadoFX
  • Create beautiful and maintainable JavaFX applications with TornadoFX
  • Understand JavaFX components and how they are easily created with TornadoFX

In Detail

JavaFX has been around for quite a long time. It's powered by Java and has been used to build desktop applications, as well as Rich Internet Applications (RIAs).

Although the Java programming language has been known for its portability, it has its pitfalls, one of which being its verbosity, wherein developers must write a lot of lines of code to make a simple GUI.

TornadoFX, a lightweight JavaFX framework for Kotlin, simplifies JavaFX development by abstracting the verbose, hard-to-maintain Java code. TornadoFX, powered by the statically typed JVM language, Kotlin, makes it easy to build rich, feature-packed user interfaces. Besides, it greatly minimizes the amount of code needed to build JavaFX applications, making the codebase easy-to-maintain and extend.

This course starts off by explaining the importance of using TornadoFX. In the sections that follow, you'll understand how to set up the development environment to start using it. Later, you'll cover the different shapes and animations in TornadoFX. To help you get hands-on experience, the course will even guide you through developing exciting applications, right from a weather forecast application through to a budget tracker application.

By the end of this course, you'll be equipped with the skills you need to confidently create JavaFX applications using TornadoFX.

Who this book is for

This course is for developers who want to learn how to build JavaFX applications with TornadoFX (Kotlin), Kotlin developers who want to build JavaFX desktop applications in TornadoFX, and even curious programming enthusiasts who want to create beautiful JavaFX applications in TornadoFX

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Introduction
    1. Introduction
    2. How's The Course Structured
    3. Who's This Course For
  2. Chapter 2 : Why TornadoFX
    1. TornadoFX - Motivation
  3. Chapter 3 : Development Machine Setup - MAC and Windows
    1. Development Setup - Download JDK and IntelliJ IDEA
    2. Install TorandoFX Plugin and Run Hello World
  4. Chapter 4 : JavaFX and TorandoFX - The Building Blocks
    1. What We'll Cover in This Section
    2. Dissecting TornadoFX Project Structure - Override Stage Size
    3. Dissect Views, Root and Block Initializers and Buttons
    4. JavaFX Overview - Controls, Layouts - Presentation
    5. Understanding Binding - Click Button and Change Label Text
    6. Random Name CHALLENGE Solution
    7. Improving Random Name App with Controller
  5. Chapter 5 : More on TorandoFX Views
    1. What We'll Cover in This Section
    2. Embedding Views - BorderPane Introduction
    3. Injecting Views into Other Views
    4. UIComponents Override Methods - OnDock, OnUndock
  6. Chapter 6 : TorandoFX - Data Controls: Collections, Listviews and TableViews
    1. Data Controls - Introduction
    2. ListViews
    3. ListViews Formatting Cells
    4. Student Project - Listviews and Restructuring Views
    5. Student Project - Listviews and Restructuring Views - All Functioning
    6. Tableview Introduction - Part 1
    7. Tableview - Creating Model Class with JavaFX Properties
    8. Student Project - Adding New Students Dynamically
  7. Chapter 7 : [Hands-On] Build a Bill Splitter Calculator
    1. What You'll Build -Bill Splitter Calculator
    2. Putting the UI Together - Part 1
    3. Putting the UI Together - Part 2
    4. Adding the Calculate Function
    5. Binding Slider Values and Showing on Screen
    6. Finished App
  8. Chapter 8 : Forms and ItemViewModel
    1. Introduction - ItemViewModel Class
    2. Understanding ItemViewModel
    3. Implementing Student Model and Updating Project
    4. Making Fields Required and Binding Buttons
    5. Model Reset - Rollback
    6. Adding Validators
    7. Model Commit - Finalizing Form Validation
  9. Chapter 9 : TornadoFX - Type-Safe CSS
    1. What We'll Cover in This Section
    2. Inline Type-Safe CSS
    3. Inline Type-Safe CSS, Cont.
    4. Applying Styles Class with Stylesheet
    5. TornadoFX Hot Reload Setup
    6. CHALLENGE - Revamp Bill Splitter Calculator
    7. SOLUTION: Bill Splitter
  10. Chapter 10 : Shapes and Animations in TornadoFX
    1. What We'll Cover in This Section
    2. Creating Rectangles
    3. Shapes inside Stackpane and Group
    4. Creating More Shapes...
    5. Animating with Timeline and Keyframe
  11. Chapter 11 : [Hands-On] Build an Interactive Application - Bubbles and Ripples
    1. What We'll Cover in This Section
    2. Setup UI - Part 1
    3. Adding Circles onClick
    4. Adding Ripple Effect
    5. Adding Random Text - Animate Label
    6. Wrap-up Bubbles and Ripples Project
  12. Chapter 12 : JSON and REST - Build a Weather Forecast Application
    1. What We'll Cover in This Section
    2. OpenWeather - Setting up our APPID
    3. Setup Weather API Model - City
    4. Temp and Weather Model Classes
    5. Setup List Model
    6. Setup Forecast Mode Class
    7. Fetching Data from API
    8. Set up UI with API Parsed Data
    9. Showing City, Date and Country
    10. Styling Labels
    11. Adding Icon Images
    12. Getting Icons Dynamically
    13. Adding Forecast Grid - Part 1
    14. Wrapping Up the Weather Forecast App
  13. Chapter 13 : TornadoFX and Database - Build a Budget Tracker Application
    1. What We'll Cover in This Section
    2. Adding SQLite and Exposed Dependencies
    3. Setup TornadoFX Workspace
    4. Setup Database Helper Methods and Logger
    5. Expenses Entry Table - Part 1
    6. Expenses Entry Table - Part 2
    7. Connecting SQLite DB
    8. Saving an Item to DB
    9. Setting Up Controller and CRUD
    10. Setting Up Controller and CRUD - Show All Items - Part 2
    11. Setting Up ExpensesEditor and Adding it to Workspace
    12. Showing Items on Tableview
    13. Adding Validation
    14. Saving Items OnKeyPressed
    15. Dynamically Showing Entered Items on Tableview
    16. Deleting Items and Updating the TableView
    17. Introduction to PieCharts
    18. : Adding PieChart Data Dynamically
    19. Removing Items from PieChart Dynamically
    20. Updating Items in PieChart Dynamically
    21. Adding Total Expenses - Part 1
    22. Finishing Up Total Expenses Feature
    23. Finalizing Budget Tracker Application
  14. Chapter 14 : Where to Go from here
    1. Where to Go from here

Product information

  • Title: TornadoFX: Build JavaFX Applications with Kotlin
  • Author(s): Paulo Dichone
  • Release date: May 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781800564176