Java examples for 2D Graphics:Pixel
Locks a Jtable's column width with 'pixels' size.
//package com.java2s; import javax.swing.table.TableColumn; public class Main { /**/*w w w . j a va 2 s .com*/ * Locks a Jtable's column width with 'pixels' size. * <p> * @param tc The table column. * @param pixels The desired pixels. */ public static void lockJTableColumnWidth(TableColumn tc, int pixels) { if (tc != null) { tc.setMinWidth(pixels); tc.setMaxWidth(pixels); tc.setPreferredWidth(pixels); tc.setResizable(false); } } }