• Post Reply Bookmark Topic Watch Topic
  • New Topic

Link URL through applet

 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Which method I should use to make URL link of some text in an applet?

Thanks in advance,
angela
 
Rahul Rathore
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the text located? In which component? If the text is the caption of button or a label or an item in a list, then attach mouselistener or action listener or selection listener, and implement the relevant listener methods to make a URLConnection etc.
 
Phil Hanna
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you have received an event notification as described in the post above, and have constructed the URL objecct, you can call
getAppletContext().showDocument(the URL)
to cause the page to be displayed.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!