|
|
Re: Hyperlink in JTable
|
Posted: Feb 9, 2005 11:04 PM
|
|
Yes, it is possible. The JTable of Java can do many things you nevver dreamed of.
A JTable uses Cell Renderers and Cell Editors (see API documentation).
Normally, allmost all Object types are displayed with a standard Text field.
You have to create a new Table Model wich calls a special Cell Renderer and Cell Editor for URLs.
Do distinguish URLs from normal text, you should create a new class or use for example the URL class.
In the method, wich delivers the renderer or editor for a certain cell, check, if the Object type of that cell is URL, then deliver you specialized renderer. In all other cases, deliver the standard renderer.
|
|