JXTipOfTheDay extends JXPanel { public void showDialog(Component parentComponent) throws HeadlessException { showDialog(parentComponent, (ShowOnStartupChoice)null); } JXTipOfTheDay();  JXTipOfTheDay(TipOfTheDayModel model); @Override void updateUI(); void setUI(TipOfTheDayUI ui); @Override TipOfTheDayUI getUI(); @Override String getUIClassID(); TipOfTheDayModel getModel(); void setModel(TipOfTheDayModel model); int getCurrentTip(); void setCurrentTip(int currentTip); void nextTip(); void previousTip(); void showDialog(Component parentComponent); boolean showDialog(Component parentComponent,
    Preferences showOnStartupPref); boolean showDialog(Component parentComponent,
    final Preferences showOnStartupPref, boolean force); boolean showDialog(Component parentComponent,
    ShowOnStartupChoice choice); boolean showDialog(Component parentComponent,
    ShowOnStartupChoice choice, boolean force); static boolean isShowingOnStartup(Preferences showOnStartupPref); static void forceShowOnStartup(Preferences showOnStartupPref); final static String uiClassID; static final String PREFERENCE_KEY; static final String CURRENT_TIP_CHANGED_KEY; }
@Test public void testChoice() throws Exception { JXTipOfTheDay.ShowOnStartupChoice noshow = new JXTipOfTheDay.ShowOnStartupChoice() { public boolean isShowingOnStartup() { return false; } public void setShowingOnStartup(boolean showOnStartup) { } }; JXTipOfTheDay totd = new JXTipOfTheDay(); assertFalse(totd.showDialog(null, noshow)); }