Save this video free

UNC COMP 301 - F26/Lec 16 - JavaFX (part 1)

Muhammad Sayeed Ghani · 1:14:38 · Watch on YouTube

UNC COMP 301 - F26/Lec 16 - JavaFX (part 1) Watch on YouTube →

Overview

Muhammad Sayeed Ghani introduces JavaFX for Java applications, covering Maven setup in IntelliJ, the Application/Stage/Scene structure, and panes for arranging interface components. He connects JavaFX events to the observer pattern and implements button responses in four ways: a named handler class, an anonymous class, a lambda, and the concise setOnAction method.

Key takeaways

Chapters

0:00 JavaFX Lecture Plan and Maven Dependency Setup
1:42 Adding JavaFX Dependencies and the Maven Plugin
3:49 Running JavaFX Applications Through IntelliJ's Maven Plugin
10:36 JavaFX Application Lifecycle and the start Method
13:04 Stage, Scene, and the JavaFX Window
16:16 JavaFX Components and Pane Layout Containers
20:00 Building a Scene with a VBox and Multiple Labels
26:49 StackPane Layering with Shapes and a Label
29:01 Mapping the Observer Pattern to JavaFX Events
38:45 Creating a Button and Registering an Action Event
46:12 Named EventHandler Class for Button Actions
56:28 Anonymous EventHandler Class for Button Actions
1:02:14 Lambda Handlers and JavaFX setOnAction
1:06:23 Two-Button Choice App and VBox Layout Details

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 Today we'll be focusing in on taking a look at Java FX which was uh briefly introduced in the last lecture which is one of the more popular graphical user interface uh libraries that is uh being used these days uh for Java and we'll start off taking a look at how to set it up in uh IntelliJ using Maven and then I'll go through a whole series of examples. Uh all the code of course is uh has been uploaded and if you would like you can um run some of these applications as we go along. I can give you some time if you if you need um and I would be curious to know if anybody runs into any problems in running Java FX because I've

0:50 been told that in the past semester some small percentage of students did have problems in running it. But we'll see how it goes. Uh we'll also take a look at um you know the observer design pattern. So as as I mentioned the observer design pattern and Java FX are fairly closely tied together and we'll see how that uh uh that relationship takes place. Uh we'll also take a look at how Java FX uses cascade stylesheets which is a concept that's used from um web programming. uh and then we will probably we won't have time into taking a look at another application which is referred to as a 2048 game but that might we might take a

1:38 look at in the next uh lecture on Tuesday. All right. So let's take a look at how do we set up Java FX in Maven. So the first thing is that it is an external module. So it has to be downloaded. Um, and the way you do that is by uh opening

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Muhammad Sayeed Ghani.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.