Chapter 16

GUI Development Using JFrame

OBJECTIVES
  • To explain the general structure of any GUI application
  • To create JLabel and JButton using swing package
  • To develop a digital clock as a JLabel
  • To introduce event handling, ActionEvent and ActionListener
  • To explain different layout managers such as FlowLayout, BorderLayout, GridLayout, BoxLayout and Box
  • To use JPanel to design multiple layouts for the frame
  • To explain the three fillers for Box namely strut, glue and rigid area
  • To introduce event types, their listeners, adapters and all methods
  • To paint JLabel with random colours whenever a button is pressed
  • To move a filled circle to random locations whenever a button is pressed
  • To create textfield, password textfield and text area
  • To display ...

Get JAVA Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.