swing - getRowHeight() in java method -
i dont understand how implement method in table class
import javax.swing.table.abstracttablemodel; public class tabel extends abstracttablemodel{ object columnnames[]; object rowdata[][]; public tabel(object[][] rowdata2, object[] columnnames2) { rowdata=rowdata2; columnnames=columnnames2; } @override public int getcolumncount() { return columnnames.length; } public int getrowcount() { return rowdata.length; } @override public object getvalueat(int rowindex, int columnindex) { return rowdata[rowindex][columnindex]; } public void setvaloare(object value,int row ,int col) { rowdata[row][col]=value; firetablecellupdated(row,col); } public int getrowheight() { } public void changeheight(int row,int column) { int i=rowdata.length; } }
i don't return because if write return rowdata.height;
doesn't work need make method changes height of specific row , column
you don't implement getrowheight() in tablemodel. tablemodel stores data , not know how data rendered.
i need make method changes heigth of specific row
if want change height of specific row can use method jtable:
table.setrowheight(row, height);
and column
you can't change height of specific column. height of columns given row same.
Comments
Post a Comment