File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hyperlinks

 
P. Sagdeo
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone know how to create hyperlinks in Applets/JApplets? (Someone clicks at X,Y and is redirected to another page). I know it can be done! Thanks
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you use the showDocument() methods in AppletContext (you say getAppletContext().showDocument(URL, "frame") to show the URL in a frame named "frame".) As far as clicking at X, Y, that's just a matter of handling the mouse events.
 
P. Sagdeo
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, but I meant open a browser and go to a website, not inside the applet.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you're thinking, but in any case, showDocument() tells the browser to open a document, just what you want. You can have the document show up in a particular frame, as I said, or it can just replace the page the applet is on if you use the one-argument version.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic