Optionpaneshowmessagedialognull how good is your


import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class MemoryProg extends JFrame
{
private static final int WIDTH = 350;
private static final int HEIGHT = 200;
private JTextField nameBox;
//**************************************************************************

public MemoryProg()
{
setTitle("Message");
setSize(WIDTH, HEIGHT);
setLayout(new FlowLayout());
setDefaultCloseOperation(EXIT_ON_CLOSE);
createContents();
setVisible(true);
}
//**************************************************************************

public void createContents()
{
JOptionPane.showInputDialog("Enter color number 1:");
nameBox = new JTextField(15);
add (nameBox);

}
//**************************************************************************
public static void main(String[] args)
{
JOptionPane.showMessageDialog(null, "How good is your memory?
n" +
"Try to memorize this color sequence: nn" +
"red white yellow green blue");
new MemoryProg7();

}
//*************************************************************************
}//end MemoryProg

Attachment:- MemoryProg.docx

Solution Preview :

Prepared by a verified Expert
Operating System: Optionpaneshowmessagedialognull how good is your
Reference No:- TGS01254004

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)