Java Code Examples for

The following examples show how to use These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: otroslogviewer   Source File:    License: Apache License 2.0 6 votes vote down vote up
public void showTipOfTheDayIfNotDisabled(Component parent) {
  Properties p = new Properties();
  try {
    TipOfTheDayModel model = new RandomTipOfTheDayModel(TipLoader.load(p));
    JXTipOfTheDay jxTipOfTheDay = new JXTipOfTheDay(model);
    jxTipOfTheDay.showDialog(parent, new ShowOnStartupChoice() {

      public void setShowingOnStartup(boolean arg0) {
        dataConfiguration.setProperty(GUI_SHOW_TIP_OF_THE_DAY, arg0);

      public boolean isShowingOnStartup() {
        return dataConfiguration.getBoolean(GUI_SHOW_TIP_OF_THE_DAY, true);
  } catch (IOException e) {
    LOGGER.warn("Can't load tip of the day: " + e.getMessage());
Example 2
public TipsOfTheDayDialog() throws IOException {
	Properties tips = new Properties();
	TipOfTheDayModel model = TipLoader.load(tips);

Example 3
Source Project: Pixelitor   Source File:    License: GNU General Public License v3.0 5 votes vote down vote up
private static TipOfTheDayModel loadModel() throws IOException {
    var properties = new Properties();
    TipOfTheDayModel model;
    try (var propertiesInputStream = TipsOfTheDay.class.getResourceAsStream("/")) {
        model = TipLoader.load(properties);
    return model;
Example 4
private TipOfTheDayModel loadModel() throws Exception {
    Properties properties = new Properties();
    InputStream propertiesIn = OrbitUtils.DARKUI ? OrbitImageAnalysis.class.getResourceAsStream("/resource/") : OrbitImageAnalysis.class.getResourceAsStream("/resource/");
    return TipLoader.load(properties);