Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mouse Click Opens Web Browser?

 
Cameron Bruce
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have website URL's in a JTable. Is it possible to display them underlined and have the web browser open when the user clicks on a URL in the JTable?
Also I have an email address in the same JTable. Is it possible for the default email client to open (after user click) with a new message to that email address in the JTable?
Thanks.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this but it's basically just a "hack"... the mechanisms are really platform specific to figure out the "default" web or email clients. Read this JavaWorld article on how to get a good Runtime.exec() engine that knows how to handle at least different versions of Windows. I can get my default browser to pop up using :


And email by using :
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic