Package org.tools.xml

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


        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();
        toolBar.setFloatable(false);
View Full Code Here


            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
        loadButton.addActionListener(new ActionListener() {
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                int row = table.getSelectedRow();
                if (row == -1) {
                    row = 0;
                }
                model.insertRow(row);
            }
        });
        // remove row button action
        delRowButton.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.