Manually trigger Pull to refresh on Container
问题 If I want to manually trigger Pull to Refresh on Container in Codename One after the load of the form. Please advise if anyone have any idea. 回答1: It's easy, the trick is the use of the showListener . Suppose that this is the starting code (taken from the Codename One Developer Guide, section "Pull to refresh"): Form hi = new Form("Pull To Refresh", BoxLayout.y()); hi.getContentPane().addPullToRefresh(() -> { hi.add("Pulled at " + L10NManager.getInstance().formatDateTimeShort(new Date())); })