本文整理了Java中javax.swing.JTable.removeColumn()
方法的一些代码示例,展示了JTable.removeColumn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.removeColumn()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:removeColumn
暂无
代码示例来源:origin: stackoverflow.com
if (table.getColumnCount() > 0) {
TableColumn colToDelete = table.getColumnModel().getColumn(table.getColumnCount() - 1);
table.removeColumn(colToDelete);
table.validate();
colDeleted.push(colToDelete);
代码示例来源:origin: stackoverflow.com
if (table.getColumnCount() > 0) {
TableColumn colToDelete = table.getColumnModel().getColumn(table.getColumnCount() - 1);
table.removeColumn(colToDelete);
table.validate();
colDeleted.push(colToDelete);
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void run() {
for( TableColumn tc : tcs ){
jt.removeColumn(tc);
}
}};
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void run() {
for( TableColumn tc : cols ){
getTable().removeColumn(tc);
}
}};
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-refactoring
private void initRenderer() {
TableColumnModel tcm = paramTable.getColumnModel();
paramTable.removeColumn(tcm.getColumn(3));
paramTable.removeColumn(tcm.getColumn(3));
Enumeration columns = paramTable.getColumnModel().getColumns();
TableColumn tc = null;
while (columns.hasMoreElements()) {
tc = (TableColumn) columns.nextElement();
tc.setCellRenderer(new ParamRenderer());
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable serverTable){
TableColumnModel tcm = serverTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 4) {
serverTable.removeColumn(tcm.getColumn(3));
}
if (tcm.getColumnCount() == 3) {
serverTable.removeColumn(tcm.getColumn(2));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable serverTable){
TableColumnModel tcm = serverTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 3) {
serverTable.removeColumn(tcm.getColumn(2));
}
if (tcm.getColumnCount() == 2) {
serverTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable nymTable) {
TableColumnModel tcm = nymTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
nymTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable serverInfoTable){
TableColumnModel tcm = serverInfoTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 3) {
serverInfoTable.removeColumn(tcm.getColumn(2));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable contactTable){
TableColumnModel tcm = contactTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
contactTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
/* RowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(this);
marketTable.setRowSorter(sorter);*/
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable){
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 3) {
marketTable.removeColumn(tcm.getColumn(2));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable contactNymTable){
TableColumnModel tcm = contactNymTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
contactNymTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable){
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable basketTable){
TableColumnModel tcm = basketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
basketTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable table){
TableColumnModel tcm = table.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
table.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public static void removeCols(JTable marketTable) {
TableColumnModel tcm = marketTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 2) {
marketTable.removeColumn(tcm.getColumn(1));
}
}
}
代码示例来源:origin: FellowTraveler/otapij
public void setValue(List values, JTable nymOutBox) {
data = new Object[values.size()][];
for(int i=0;i<values.size();i++){
String[] row = (String[]) values.get(i);
data [i] = row;
}
TableColumnModel tcm = nymOutBox.getColumnModel();
System.out.println("nymbox.getColumn(2)"+tcm.getColumnCount());
if(tcm.getColumnCount()==4){
nymOutBox.removeColumn(tcm.getColumn(3));
}
fireTableDataChanged();
}
内容来源于网络,如有侵权,请联系作者删除!