Package org.tools.xml

Examples of org.tools.xml.XTable.insertColumn()


        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        table.setColumnSelectionAllowed(true);
        table.setRowSelectionAllowed(true);
        // add model
        final XTable model = new XTable();
        model.insertColumn("New Column", 0);
        model.insertRow(0);
        table.setModel(model);

        // create tool bar
        JToolBar toolBar = new JToolBar();
View Full Code Here


            @Override
            public void actionPerformed(ActionEvent e) {
                int confirm = JOptionPane.showConfirmDialog(TableEditorFrame.this, "Discard all changes?", "New Table", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                if (confirm == JOptionPane.YES_OPTION) {
                    model.clear();
                    model.insertColumn("New Column", 0);
                    model.insertRow(0);
                }
            }
        });
        // load table button action
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                int column = table.getSelectedColumn();
                if (column == -1) {
                    column = 0;
                }
                model.insertColumn("New Column", column);
            }
        });
        // remove column button action
        delColumnButton.addActionListener(new ActionListener() {
            @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.