private String loadResourceString(String filename) {
    // Reading resources of JAR file
    InputStream in = getClass().getResourceAsStream(filename);
    if (in != null) {
      StringBuilder sb = new StringBuilder();
      String line;
      {
        BufferedReader reader = null;
        try {
          InputStreamReader sr = new InputStreamReader(in, "UTF-8");
          reader = new BufferedReader(sr);
          while ((line = reader.readLine()) != null) {
            sb.append(line).append("\n");
          }
        } catch (IOException ex) {
          Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
          try {
            in.close();
            try {
              if (reader!=null) reader.close();
            } catch (IOException ex) {
              Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
            }
          } catch (IOException ex) {
            Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
          }
        }
      }
      return sb.toString();
    } else {
      return "";
    }
  }