Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.swing.*;

public class Main {
    public static void setColumnWidth(JTable table, int index, int width) {
        table.getColumnModel().getColumn(index).setMinWidth(width);
        table.getColumnModel().getColumn(index).setMaxWidth(width);
        table.getColumnModel().getColumn(index).setPreferredWidth(width);
    }
}