Professional Documents
Culture Documents
convertButton.addActionListener(new convertAction());
// File : gui-tutorial/DogYears.java
// Purpose: Dog Year Converter uses buttons, labels, text fields.
// NOTE: The button doesn't do anything yet.
// Author : Fred Swartz - 2006-11-09 - Placed in public domain.
import java.awt.*;
import javax.swing.*;
//======================================================== constructor
public DogYears() {
// 1... Create/initialize components
JButton convertBtn = new JButton("Convert"); //Note 3