if (event.getSource() == _fillButton) {
fillPlot();
} else if (event.getSource() == _printButton) {
// FIXME: Code duplication with PlotFrame._printCrossPlatform
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
PrinterJob job = PrinterJob.getPrinterJob();
// rbeyer@LPL.Arizona.EDU: Get the Page Format and use it.
//PageFormat format = job.pageDialog(job.defaultPage());
//job.setPrintable(PlotBox.this, format);
job.setPrintable(PlotBox.this);
if (job.printDialog(aset)) {
try {
job.print(aset);
} catch (Exception ex) {
Component ancestor = getTopLevelAncestor();
JOptionPane.showMessageDialog(ancestor,
"Printing failed:\n" + ex.toString(),
"Print Error", JOptionPane.WARNING_MESSAGE);