java - Add Clickable JPanel to AbstractTableModel -



java - Add Clickable JPanel to AbstractTableModel -

i have class extends abstracttablemodel , i'd insert jpanel clickable text (think hyperlink) 1 of cells. possible? output in cell jpanel looks "javax.swing.jpanel[,0,0,0x0,invalid,layout=java.awt.flowlayout,ali..." i've used same type of jlabel elsewhere in application open new tabs , have same type of action in table.

public object getvalueat(int row, int column) { if (row >= getrowcount()) homecoming "???"; switch (column) { case 1: homecoming "???" case 2: homecoming myjpanel; case 3: homecoming "?" ; case 4: homecoming new integer(2); default: homecoming "???" ; } }

this isn't how table models work. table models model data. provide info view of construction , type of data.

it's view utilize info , decide how should displayed.

what after role of table cell renderer , editor.

take @ how utilize tables more details

java swing hyperlink tablecellrenderer

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -