import java.awt.event.*;
import java.awt.*;

/**
 *
 *
 * @author Ashfaqur Rahman
 * @author Prashant Paroda
 * @author Mike Yohay
 * @author Jared Baszler
 * @version 1.0 of November 17, 1999
 *
 */

public class Preferences 
    extends WindowAdapter 
    implements ActionListener 
{
    protected Frame preferences;

    protected Button okButton, cancelButton, helpButton;

    protected Label out;

    protected Preferences() {
        preferences = new Frame("Preferences");
        preferences.setBackground(Color.black);
        preferences.setForeground(Color.white);
        preferences.addWindowListener(this);
        GridBagLayout gridbag = new GridBagLayout();
        preferences.setLayout(gridbag);
        GridBagConstraints c = new GridBagConstraints();
        c.weightx = 0.1;
        c.weighty = 0.1;

        out = new Label("UNDER CONSTRUCTION");
        out.setFont(new Font("Times", Font.BOLD, 30));
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.anchor = GridBagConstraints.CENTER;
        c.gridx = 0;
        c.gridy = 0;
        gridbag.setConstraints(out, c);
        preferences.add(out);

        okButton = new Button("OK");
        okButton.addActionListener(this);
        okButton.setFont(new Font("Times", Font.BOLD, 35));
        okButton.setBackground(java.awt.Color.red);
        okButton.setForeground(java.awt.Color.black);
        c.anchor = GridBagConstraints.SOUTH;
        c.gridwidth = 1;
        c.gridy = GridBagConstraints.RELATIVE;
        gridbag.setConstraints(okButton, c);
        preferences.add(okButton);

        cancelButton = new Button("Cancel");
        cancelButton.addActionListener(this);
        cancelButton.setFont(new Font("Times", Font.BOLD, 35));
        cancelButton.setBackground(java.awt.Color.red);
        cancelButton.setForeground(java.awt.Color.black);
        c.gridx = 1;
        gridbag.setConstraints(cancelButton, c);
        preferences.add(cancelButton);
        
        helpButton = new Button("Help");
        helpButton.addActionListener(this);
        helpButton.setFont(new Font("Times", Font.BOLD, 35));
        helpButton.setBackground(java.awt.Color.red);
        helpButton.setForeground(java.awt.Color.black);
        c.gridx = 2;
        gridbag.setConstraints(helpButton, c);
        preferences.add(helpButton);

        preferences.pack();
        preferences.setSize(600,500);
        preferences.show();

    }

    public void actionPerformed(ActionEvent evt) {
        String command = evt.getActionCommand();
        if (command.equals("OK")) {
            preferences.dispose();
        }
        else if(command.equals("Cancel")) {
            preferences.dispose();
        }
        else if(command.equals("Help")) {
            new Help();
        }
    }

    public void windowClosing(WindowEvent event) {
        preferences.dispose();
    } 
    
    public static void main(String[] args) {
        new Preferences();
    } 
} 

