Search code examples
javahyperlinkappletprocessingclickable

How to display clickable hyperlink in Papplet Java application?


I know how to display simple text with the processing.core.PApplet.text method.
But this one can't display clickable hypertext link. How could I make that in Papplet ?
I precise that link should open the web browser.
Thanks.


Solution

  • It's not documented on the main Reference page at http://processing.org/reference/, but you can use a function called 'link()' ... it takes up to two parameters - the url to go to, and if the second argument is supplied, sets whether to open a new page or not...

    Eg.

    link("http://www.processing.org", "_new");