Hi,
I have developed an applet which detects the printers and outputs the list. here's the code for that.
import javax.print.*;
import java.awt.*;
@SuppressWarnings("serial")
public class Test extends java.applet.Applet {
public void paint(Graphics g) {
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
int x=5,y=20;
for (PrintService printer : printServices)
{
g.drawString(printer.getName(),x,y);
y+=20;
}
}
}
- I want to have a link that contains the string as the detected printer name.
For example; I have a Lexmark A1000 connected to my computer. I run this online applet to detect my printer. It detects successfully and returns the string “Lexmark A1000” with a link that contains the string. Then it asks if I want to detect my “installed printers”. If I say yes, it will also detect my network printer “Samsung X1000”. I will have two links showing on the screen each one going to the corresponding printer page.
Please help me.
Thank You