com.stevesoft.pat.apps.Message Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pat Show documentation
Show all versions of pat Show documentation
Regular Expressions in Java
The newest version!
//
// This software is now distributed according to
// the Lesser Gnu Public License. Please see
// http://www.gnu.org/copyleft/lesser.txt for
// the details.
// -- Happy Computing!
//
package com.stevesoft.pat.apps;
import java.awt.*;
import java.util.*;
/** A simply class for making a message box with arbitrary
text inside it. */
public class Message extends Frame {
/** @serial */
public Vector v = new Vector();
/** @serial */
public Component c=null;
/** Open the window. When any of the buttons on the
window are clicked, the associated message will be delivered to
component c. */
public void ask(Component c) {
this.c = c;
packNShow();
}
public void packNShow() {
int i;
GridBagLayout gb = new GridBagLayout();
setLayout(gb);
GridBagConstraints gc = new GridBagConstraints();
gc.gridx = 0;
gc.fill = gc.HORIZONTAL;
int xpos = 0,ypos = 0;
Label lab;
for(i=0;i