void () { if (myComponent instanceof JList) movePageDown((JList<?>)myComponent); else if (myComponent instanceof JTable) movePageDown((JTable)myComponent); else throw new IllegalArgumentException("PageDown is not implemented for " + myComponent.getClass()); }