Example usage for javax.swing JTable update

List of usage examples for javax.swing JTable update

Introduction

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

Prototype

public void update(Graphics g) 

Source Link

Document

Calls paint.

Usage

From source file:jp.massbank.spectrumsearch.SearchPage.java

/**
 * ??/*from  w  w w  .jav  a 2  s .  c om*/
 */
private void updateSelectQueryTable(JTable tbl) {

    // ?
    this.setCursor(waitCursor);

    int selRow = tbl.getSelectedRow();
    if (selRow >= 0) {
        tbl.clearSelection();
        Color defColor = tbl.getSelectionBackground();
        tbl.setRowSelectionInterval(selRow, selRow);
        tbl.setSelectionBackground(Color.PINK);
        tbl.update(tbl.getGraphics());
        tbl.setSelectionBackground(defColor);
    }
    // ?
    this.setCursor(Cursor.getDefaultCursor());
}