DANCEST 303 Lecture Notes - Lecture 28: Terminal Emulator, Javafx, Abstract Window Toolkit

8 views16 pages
12 Jul 2020
School
Department
Professor

Document Summary

Graphics and event handling: applications are stand-alone applications that can launched from command line. Each application has no restrictions what it can do; Console applications run in a single terminal window; Graphical applications use one or more windows filled with graphical user interface (gui) components such as buttons, text fields, and menus. Graphical applications: a graphical application shows information in a frame window. There exist three main graphics packages: abstract windowing toolkit (awt, swing, javafx. To show a frame in swing, carry out the following steps: Set the size of the frame: frame. setsize(300, 400); Set the title of the frame: frame. settitle("an empty frame"): set the default operation: frame. setdefaultcloseoperation(jframe. exit_on_close), make the frame visible: frame. setvisible(true); Note that to use the jframe class you need to import swing package! Graphical applications: drawing shapes: to display a drawing, define a class (e. g. rectanglecomponent) that extends the.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents