这里面包含了一百多个JAVA源文件

源代码在线查看: e918. setting the column resize mode of a jtable component.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				Resizing the width of a column can affect the widths of the other columns in the table. There are several resizing modes available. The default is AUTO_RESIZE_SUBSEQUENT_COLUMNS. 
				    // Disable auto resizing
				    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
				    
				    // When the width of a column is changed,
				    // the width of the right-most column is changed
				    // so that the width of the entire table does not change
				    table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
				    
				    // When the width of a column is changed,
				    // all columns to the right are resized so that the width
				    // of the entire table does not change
				    table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
				    
				    // When the width of a column is changed,
				    // only the columns to the left and right of the
				    // margin change
				    table.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
				    
				    // When the width of a column is changed,
				    // the widths of all columns are changed
				    // so that the width of the entire table does not change
				    table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
				
				 Related Examples 
				
							

相关资源