private void checkVersion() {
    try {
      String v = new Wiki("commons.wikimedia.org").getPageText("User:Yarl/VicunaUploader/version").trim();
      if (Double.parseDouble(v) > Double.parseDouble(Data.version)) {
        Object[] o = {Data.text("button-autoupdate"), Data.text("button-download"), Data.text("button-cancel")};
        int n = JOptionPane.showOptionDialog(rootPane, "<html><body>" + Data.text("about-checkupdate-text") + " (<b>" + v + "</b>).</body></html>",
                Data.text("about-checkupdate"), JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, o, o[0]);
        if (n == 0) {
          try {
            new FDownload(this, new URL(UPDATE_URL));
          } catch (MalformedURLException ex) {
            error("Cannot download: <" + UPDATE_URL + ">", ex);
          }
        } else if (n == 1) {
          try {
            Desktop.getDesktop().browse(new URI(HOMEPAGE_URL));
          } catch (URISyntaxException ex) {
            error("Cannot navigate to the home page: <" + HOMEPAGE_URL + ">", ex);
          } catch (IOException ex) {
            error("Cannot navigate to the home page: <" + HOMEPAGE_URL + ">", ex);
          }
        }
      }
    } catch (IOException ex) {
      error("Cannot check for the new version", ex);
    }
  }