// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   TextDialog.java

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class TextDialog extends Dialog
    implements ActionListener
{

    public TextDialog(Frame frame, String s, int i)
    {
        super(frame, true);
        returnValue = "";
        addNotify();
        inputText = new TextField(i);
        Label label = new Label(s);
        inputText.setBackground(ScrambleSettings.dkBgColor);
        label.setBackground(ScrambleSettings.dkBgColor);
        inputText.addActionListener(this);
        add(label, "West");
        add(inputText, "Center");
        pack();
        Dimension dimension = getSize();
        Dimension dimension1 = frame.getSize();
        getToolkit().getScreenSize();
        Point point = frame.getLocation();
        point.translate((dimension1.width - dimension.width) / 2, (dimension1.height - dimension.height) / 2);
        setLocation(point.x, point.y);
        setResizable(false);
        show();
        toFront();
    }

    public String answer()
    {
        return returnValue;
    }

    public void actionPerformed(ActionEvent actionevent)
    {
        returnValue = inputText.getText();
        dispose();
    }

    String returnValue;
    TextField inputText;
}
