Home > Articles > Programming > Java

Java Menus #1: Java Swing and Menus

  • Print
  • + Share This
Welcome to the premiere article of Swing Solutions! The purpose of this column is to use small, yet worthwhile examples to teach you how to use Java 2 Swing components in your applications and applets. This column will break up small projects into several pieces that will be presented in monthly articles, each focusing on a different aspect of Swing.
From the author of

JWord Application

Our first project is a small word processor application; do not expect to write the next Microsoft Word in a handful of articles, but it will be robust enough to (1) be useful and expandable (if you have the motivation) and (2) teach you a couple of things about the Java Swing classes.

JWord has the following features:

  • Java menu bar

  • Dynamically created Java popup menus

  • Toolbar with tooltips

  • Support for editing multiple documents

  • Document formatting through the JEditPane

  • Clipboard from which you can cut and paste text

In this first article, we are going to begin with a discussion of the support that Java Swing provides for menus—both menu bars and popup menus.

  • + Share This
  • 🔖 Save To Your Account