CSE 8B Lecture Notes - Lecture 12: Javafx

46 views3 pages

Document Summary

Scene: container for all items in scene. Border, hbox, vbox, flowpane, gridpane: helper classes governing where components appear in scene. Create layout manager create and add components make scene set properties. Must write a class that implement eventhandler class handlerclass implements eventhandler { // code to do after event is formed. To go around the issue of method/ instance field accessibility, use inner classes when it comes to creating these eventhandler classes public class gui extends application { public static void main(string[] args) { launch(args); // code for gui public void saysomething() { // this class has access to methods defined in gui. java. // like saysomething() and its private instance variables. Inner classes are not subclasses of the class it is inside: they just exist within the scope of the outer class, and are not in a is-a relationship. Inner class/ separate class: good for wanting to reuse the same piece of code class deposithandlerclass implements eventhandler {

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents