public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && getParent() != null) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if ((this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF) && (getParent() != null)) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
public Dimension getPreferredScrollableViewportSize() { Dimension pref = super.getPreferredScrollableViewportSize(); if (this.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF && getParent() != null) { Insets insets = getParent().getInsets(); Dimension size = getParent().getSize(); pref.height = size.height - insets.top - insets.bottom; } return pref; }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && width != getPreferredScrollableViewportSize().width) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && width != getPreferredScrollableViewportSize().width) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }
/** Try to revalidate once again because we want table to have * width that it asked for. */ public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) { return; } if (trytorevalidate && (width != getPreferredScrollableViewportSize().width)) { trytorevalidate = false; compoundScrollPane.validate(); trytorevalidate = true; } }