Example usage for javax.swing JTable selectAll

List of usage examples for javax.swing JTable selectAll

Introduction

In this page you can find the example usage for javax.swing JTable selectAll.

Prototype

public void selectAll() 

Source Link

Document

Selects all rows, columns, and cells in the table.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    int rows = 10;
    int cols = 5;
    JTable table = new JTable(rows, cols);

    // //from w  w w .  j  a v  a  2 s  .c o m
    table.selectAll();
}

From source file:org.openconcerto.erp.core.finance.accounting.ui.PlanComptableGPanel.java

private void actionDroitTable(MouseEvent e, final JTable table) {
    JPopupMenu menuDroit = new JPopupMenu();

    for (int i = 0; i < this.actionClickDroit.size(); i++) {
        menuDroit.add((AbstractAction) this.actionClickDroit.get(i));
    }/*from  w  ww  . j  av a 2 s.com*/

    menuDroit.add(new AbstractAction("Tout slectionner") {

        public void actionPerformed(ActionEvent e) {
            table.selectAll();
        }
    });

    menuDroit.show(e.getComponent(), e.getX(), e.getY());

    System.out.println("Click droit sur JTable");
}