Palash Ray

Greenhorn
+ Follow
since Mar 17, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Palash Ray

There is something called the HyperlinkListener. U need to imoplement this to listen to the hyperlink clicks.

Look at: j2sdk1.4.x\demo\jfc\SwingSet2\src\HtmlDemo.java

Here is the essence:

new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
if (e instanceof HTMLFrameHyperlinkEvent) {
((HTMLDocument)html.getDocument()).processHTMLFrameHyperlinkEvent(
(HTMLFrameHyperlinkEvent)e);
} else {
try {
html.setPage(e.getURL());
} catch (IOException ioe) {
System.out.println("IOE: " + ioe);
}
}
}
}
}
18 years ago
use javax.swing.JToggleButton instead of the usual JButton
18 years ago
You need to use a Vector of Vector.

Vector cellsInRow1 = new Vector();
cellsInRow1.addElement("1");
cellsInRow1.addElement("2");
cellsInRow1.addElement("3");
cellsInRow1.addElement("4);

Vector rows = new Vector();
rows.addElement(cellsInRow1);

And then in the table model, pass rows as the argument.
18 years ago