/*
* 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 (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*
* Find Printer dialog implementation
*/
theTop = t;
JLabel l;
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());
public void actionPerformed(ActionEvent e) {
okPressed();
}
});
c.gridx = 1;
c.gridy = 0;
c.weightx = 1.0;
p.add(printerName, c);
c.gridx = 0;
c.gridwidth = 2;
p.add(statusText, 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
pack();
// handle Esc as dismiss in any case
public void actionPerformed(ActionEvent e) {
}},
// set focus to initial field, depending on which action is tbd
// this seems to work best after pack()
/*
* frame.setVisible(true);
* frame.repaint();
*/
// getRootPane().setDefaultButton (okButton);
// enable improved focus handling
}
public void okPressed() {
printerName.getText());
if (!result)
else
// pmFindPanel.this.frame.setVisible (false);
}
public void cancelPressed() {
pmFindFrame.this.setVisible(false);
}
}