Title: Java Eclipse - JFrame 4
Description: In addition to frames, this video introduces buttons and events. We start by creating a frame that contains three buttons and a label. The buttons are: "Change Color", "Change Font", and "Make Italic". We create a label under the buttons. When the user clicks on one of the buttons, the corresponding action will take place on the label: the first will change the text color in the label, the second changes the font of the text, and the third makes the text italic. within the actionPerformed, we interrogate the ActionEvent to know the source of the action (which button was clicked).
Methodology: Good coding standards and object-oriented design.
Technologies: Java, object-oriented programming
Examples constructed: We create a frame that contains three buttons and a label. When the user clicks on a button the corresponding action will be performed on the label.
Keywords: class, JFrame, EventQueue, Runnable, main, EXIT_ON_CLOSE, ActionListener, actionPerformed, JButton, JLabel, getSource, JPanel.