• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

HTML creating *functional* links in JTable table cells?

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using html tags to do some text highlighting in some cells of my JTable. I've noticed that using <a href="whatever">whatever</a> produces text that looks like a hyperlink, but doesn't actually allow the user to click it and launch anything.

Is there a way to get link clicks in GUI components to actually function?
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JEditorPane has code that can fire HyperlinkEvents when the user clicks on hyperlinks. The other components don't, so you would need detect the mouse clicks yourself.

With JTable you have the added complication that the renderer that painted the contents of the cell probably doesn't exist when the user does his/her clicking.
 
This tiny ad will self destruct in five seconds.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic