pmOther.java revision 62d717f5277d7b19b63db2d800310f877b57c197
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*
*/
/*
* panel dialog which captures "other"
*/
}
super(f, title, true); // modal
theTop = t;
theTag = h;
JLabel l;
pmButton b;
JPanel p;
// initialize constraints
GridBagConstraints c = new GridBagConstraints();
c.gridx = 0;
c.gridwidth = 1;
c.gridheight = 1;
c.weightx = 1.0;
// top panel contains the message
p = new JPanel();
p.setLayout(new GridBagLayout());
p.add(l, c);
// middle panel contains "other" text field
p = new JPanel();
p.setLayout(new GridBagLayout());
okPressed();
}
});
c.gridx = 1;
c.gridy = 0;
c.weightx = 1.0;
p.add(deviceName, c);
// bottom panel contains buttons
c.gridx = 0;
c.weightx = 1.0;
c.weighty = 0.0;
okPressed();
}
});
cancelButton = new pmButton(
}
});
helpButton = new pmButton(
}
});
}
// lay out the dialog
this.pack();
this.addWindowListener(new WindowAdapter() {
pmOther.this.setVisible(false);
}
});
// this.getRootPane().setDefaultButton(okButton);
// handle Esc as cancel in any case
public void actionPerformed(ActionEvent e) {
}},
}
public int getValue() {
return returnValue;
}
public void okPressed() {
pmOther.this.setVisible(false);
}
public void cancelPressed() {
}
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
}
});
f.setVisible(true);
while (true) {
d.setVisible(true);
}
// System.exit(0);
}
}