Learn how to create event listeners.
- [Instructor] In this video, we'll add some listeners…to respond to our ui events.…I'd like to start here between the main panel…and build main frame function to add the new functionality.…First, I'd like to create a place to store some ui data.…And I'll call this ui dash data.…I'll make this a cloudera atom…and I'm gonna make the default value a hashmap…with the key copy and the value true.…I'm using an atom here…so that I have an atomic data structure…which can be written to and read from,…from different events simultaneously without collisions.…
Now, I'll implement an event called choose dir.…And I'll give it a couple of parameters.…The frame we're working with and a key…which is the key word…corresponding to the component that was activated.…I'll start by using…the seesaw choosers choose file function…and I'll pass it a selection mode key word…with the dirs only key word.…This means that the file chooser…will only allow you to select folders rather than files.…
Now I'll pass it dir and the string resources…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.