Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class Main {
    public static void main(String[] argv) {
        DefaultTableModel model = new DefaultTableModel();
        JTable table1 = new JTable(model);
        JTable table2 = new JTable(model);

        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        splitPane.add(new JScrollPane(table1));
        splitPane.add(new JScrollPane(table2));

        table1.getColumnModel().removeColumn(table1.getColumnModel().getColumn(0));
    }
}