Skip to content

Commit 4213437

Browse files
committed
JSTableUI failure to test for ScrollPane on table.
1 parent c429e6c commit 4213437

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTableUI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,8 @@ protected void installDefaults() {
17601760

17611761
private JScrollPane getScrollPane() {
17621762
Container parent;
1763-
return (JScrollPane) ((parent = table.getParent()) == null ? null : parent.getParent()); // should be the scrollpane
1763+
parent = ((parent = table.getParent()) == null ? null : parent.getParent());
1764+
return (parent instanceof JScrollPane ? (JScrollPane) parent : null);
17641765
}
17651766

17661767
private void installDefaults2() {

0 commit comments

Comments
 (0)