// Constructor to setup GUI components and event handlers
public AWTCounter()
{
setLayout(new FlowLayout()); // sets its layout to FlowLayout to arrange
lblCount = new Label("Counter"); // construct the Label component
add(lblCount); // Frame container adds Label component
tfCount = new TextField(count + "", 10); // construct the TextField component with initial text
tfCount.setEditable(false); // set to read-only
add(tfCount); // Frame container adds TextField component
btnCount = new Button("Count"); // construct the Button component
add(btnCount); // Frame container adds Button component
}