Cartesian Plane Lesson 15 Page 9: Summary

That’s it for our introduction to GUI development. We’ve covered almost all the Swing components we need to complete the Cartesian Plane project. We talked about how to arrange the components using nested JPanels and layout managers; how to improve their appearance using borders; and how to interact with them using event listeners. There are only a couple of more Swing components for us to look at including:

  • JRadioButton, a type of toggle button that appears in sets of mutually-exclusive options (“pick one of the following”).
  • ButtonGroup, a component for collecting radio buttons.
  • JMenuBar, JMenuItem, JMenu, components for creating menus.

We’ve made some of our own components: ColorSelector, a dialog for selecting a color using the JColorChooser component, and ColorEditor and FontEditor, collections of components for choosing/editing colors and fonts. Future activities involving these components include:

  • Adding a facility to support property listeners to FontEditor.
  • Integrating ColorEditor into window hierarchies for selecting background and line colors.
  • Integrating FontEditor into facilities for choosing fonts and text colors for labels on the Cartesian plane grid, and perhaps a couple of GUI components we have yet to develop.

GitHub repository: Cartesian Plane Part 15

Previous lesson: Cartesian Plane Lesson 15 Page 8: Testing the FontEditor Class

Next:
Setting Visual Properties for the Cartesian Plane