CS 2110 Lecture Notes - Lecture 14: Graphical User Interface, Reactive Programming, Javafx
Document Summary
Lecture 14 - guis: gui - graphical user interface. Lots of different threads of execution essentially simultaneously. Nice interface between user and program: two aspects. Listening/responding to events: three gui packages. Swing - builds on awt, but is lightweight . Javafx - new and powerful, but hella, and i mean hella, complicated: gries is a god. Don"t question his omnipotence: let"s go back to jframe class. How do we place components? public class c extends jframe { public c() { Puts our button object on the east side of the pane cp. add(jl, borderlayout. west); Puts our label on the west side of the pane pack(); This says, hey, we"ve placed everything where we want it, pack it all together! setvisible(true); When you make a new gui, don"t make it all on your own. Copy and paste, they all kinda look pretty similar. What are some more things we can add to a jframe object? (components)