how do i print swing object (using JDK 1.1.8 and swing 1.1.1)?

i am trying something like this

public void doPrint()
{
Frame f = new Frame("printframe");
f.setSize(350, 200);
f.setLocation(100, 100);
Label lbl = new Label("text for test");
f.add("North", lbl);
PrintJob pj = getToolkit().getPrintJob(f, "Testing", null);
if (pj != null)
{
Graphics pg = pj.getGraphics();
printComponents(pg);
pg.dispose();
pj.end();
}
}

but i can only get it to work with awt stuff, how do i print the swing
objects?

regards

Peter Tilsted


_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to