I'm a newbie to Java really, so I'm asking a newbie question How do I load a web page inside a Java applet? I just want to be able to print a page, and have the simple GUI as usual. I can make the GUI and all; only problem is I don't have a function to display a URL of my choice. Any snippets would be great. Thanks
Hmm, you mean load an applet into a webpage?? or you at something far more fancy? If its the former and presuming you have the applet written: <applet code=yourfilename width=200 height=200></applet> If its the latter try looking up applet.getAppletContext().showDocument (URL) ...only thing is pop up blockers may kill it if thats the route you are taking. Your code will look something like: applet.getAppletContext().showDocument(new URL(yourUrl!!); If your URL is a local file (such as D:/myTextFile.txt) you may find yourself messing around with slashes depending on the browser visiting. Hope this helps.