Java JTable Scroll makeTransparant(JTable table, JScrollPane scrollPane)

Here you can find the source of makeTransparant(JTable table, JScrollPane scrollPane)

Description

make Transparant

License

Open Source License

Declaration

public static void makeTransparant(JTable table, JScrollPane scrollPane) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JComponent;

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

import javax.swing.table.DefaultTableCellRenderer;

public class Main {
    public static void makeTransparant(JTable table, JScrollPane scrollPane) {
        table.setOpaque(false);/*from   www . j av  a 2  s  .  c om*/
        ((DefaultTableCellRenderer) table.getDefaultRenderer(Object.class)).setOpaque(false);
        ((DefaultTableCellRenderer) table.getDefaultRenderer(String.class)).setOpaque(false);
        ((JComponent) table.getDefaultRenderer(Boolean.class)).setOpaque(false);

        scrollPane.setOpaque(false);
        scrollPane.getViewport().setOpaque(false);
    }
}

Related

  1. addHorizontalScrollBar(JTable table, JScrollPane pane)
  2. AutoScrollTable(final JTable table_packets)
  3. createTableScrollPane(final JTable table)
  4. findScrollPane(JTable p_Table)
  5. getScrollPane(JTable myTable)
  6. scroll(JTable table, int rowIndex, int vColIndex)
  7. scrollToCenter(JTable table, int rowIndex, int vColIndex)
  8. scrollToLastSelectedRow(final JTable table)
  9. scrollToPosition(JTable table, int insertRow)