Can Browser Print Applet’s Output?

Can Browser Print Applet’s Output?

I have written an applet that creates a graph from the resultsof a query of our Oracle database. The graph looks good in the browser(Netscape 3.0), but if I go to print the broswer page,nothing in my applet shows up. Text and graphics above and below theapplet will print fine, but there will just be a big blank spot where thegraph should be.

That is normal. Unfortunately, Netscape makes no effort to find outwhat the Java program draws onto the screen. (It could, in theory, tryto have that subwindow redraw itself and capture the output, then scalethe screen pixels to the printer. But it doesn’t.) And, there is no JavaAPI for printing.

There will, at some point in the future, be Java support for printing.Sun and Adobe are jointly working on an improved graphics model andprinting support. When that happy moment comes, your Java applicationswill be able to print. Whether or not that capability will extend toapplets is anyone’s guess for now.

See also  5 Tips for Choosing the Right Medical Software for Your Practice

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist