BF [ 1891082 ] NPE on MiniTable when you hide some columns
This commit is contained in:
parent
8340239975
commit
6216f2c06e
|
@ -44,6 +44,9 @@ import org.compiere.util.*;
|
|||
* </code>
|
||||
* @author Jorg Janke
|
||||
* @version $Id: MiniTable.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
|
||||
*
|
||||
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||
* <li>BF [ 1891082 ] NPE on MiniTable when you hide some columns
|
||||
*/
|
||||
public class MiniTable extends CTable
|
||||
{
|
||||
|
@ -117,9 +120,11 @@ public class MiniTable extends CTable
|
|||
renderer = getCellRenderer(row, col);
|
||||
comp = renderer.getTableCellRendererComponent
|
||||
(this, getValueAt(row, col), false, false, row, col);
|
||||
if (comp != null) {
|
||||
int rowWidth = comp.getPreferredSize().width + SLACK;
|
||||
width = Math.max(width, rowWidth);
|
||||
}
|
||||
}
|
||||
// Width not greater ..
|
||||
width = Math.min(MAXSIZE, width);
|
||||
tc.setPreferredWidth(width);
|
||||
|
|
Loading…
Reference in New Issue