Java JTable Scroll addHorizontalScrollBar(JTable table, JScrollPane pane)

Here you can find the source of addHorizontalScrollBar(JTable table, JScrollPane pane)

Description

Force l'ajout d'une scrollbar horizontale sur une JTable.

License

Apache License

Declaration

public static void addHorizontalScrollBar(JTable table, JScrollPane pane) 

Method Source Code

//package com.java2s;
/*/*  www . j a v a  2 s.c  o  m*/
 * codjo.net
 *
 * Common Apache License 2.0
 */

import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JTable;

public class Main {
    /**
     * Force l'ajout d'une scrollbar horizontale sur une JTable.
     */
    public static void addHorizontalScrollBar(JTable table, JScrollPane pane) {
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        pane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL));
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    }
}

Related

  1. AutoScrollTable(final JTable table_packets)
  2. createTableScrollPane(final JTable table)
  3. findScrollPane(JTable p_Table)
  4. getScrollPane(JTable myTable)