Skeleton of the ButtonQuitter Program

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page

Answer:

No. The diagram leaves that relationship out.

Skeleton of the ButtonQuitter Program

Here is the program, designed according to the relationship diagram:

import java.awt.*;
import java.awt..*; 
import .swing.*; 

public class ButtonQuitter extends  implements 
{
  JButton bQuit = new JButton("Click here to Exit"); 

  public ButtonQuitter()  
  {
    super(title);
    ( new FlowLayout() );
    bQuit.( this );
    ( bQuit ); 
  }
   
  public void ( ActionEvent evt)
  {
    System.exit( 0 );
  }

  public static void main ( String[] args )
  {
    ButtonQuitter frame = new ButtonQuitter("Button Quitter");
    
    frame.setSize( 200, 100 );  
    frame.( true );      

  }
}

QUESTION 22:

There seem to be some blanks. How many can you fill in correctly?