gc.anchor = GridBagConstraints.NORTHWEST;
gc.fill = GridBagConstraints.HORIZONTAL;
gc.weightx = 1.0;
gc.gridwidth = 2;
HtmlPanel pnlMessage = new HtmlPanel();
HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
pnlMessage.setText("<html><body><p class=\"warning-body\">"
+ tr("Please enter your OSM user name and password. The password will <strong>not</strong> be saved "
+ "in clear text in the JOSM preferences and it will be submitted to the OSM server <strong>only once</strong>. "
+ "Subsequent data upload requests don''t use your password any more.")
+ "</p>"
+ "</body></html>");
pnl.add(pnlMessage, gc);
// the user name input field
gc.gridy = 1;
gc.gridwidth = 1;
gc.anchor = GridBagConstraints.NORTHWEST;
gc.fill = GridBagConstraints.HORIZONTAL;
gc.weightx = 0.0;
gc.insets = new Insets(0,0,3,3);
pnl.add(new JLabel(tr("Username: ")), gc);
gc.gridx = 1;
gc.weightx = 1.0;
pnl.add(tfUserName = new JosmTextField(), gc);
SelectAllOnFocusGainedDecorator.decorate(tfUserName);
valUserName = new UserNameValidator(tfUserName);
valUserName.validate();
// the password input field
gc.anchor = GridBagConstraints.NORTHWEST;
gc.fill = GridBagConstraints.HORIZONTAL;
gc.gridy = 2;
gc.gridx = 0;
gc.weightx = 0.0;
pnl.add(new JLabel(tr("Password: ")), gc);
gc.gridx = 1;
gc.weightx = 1.0;
pnl.add(tfPassword = new JosmPasswordField(), gc);
SelectAllOnFocusGainedDecorator.decorate(tfPassword);
valPassword = new PasswordValidator(tfPassword);
valPassword.validate();
gc.gridy = 3;
gc.gridx = 0;
gc.anchor = GridBagConstraints.NORTHWEST;
gc.fill = GridBagConstraints.HORIZONTAL;
gc.weightx = 1.0;
gc.gridwidth = 2;
pnlMessage = new HtmlPanel();
kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
pnlMessage.setText("<html><body>"
+ "<p class=\"warning-body\">"
+ tr("<strong>Warning:</strong> JOSM does login <strong>once</strong> using a secure connection.")
+ "</p>"
+ "</body></html>");
pnl.add(pnlMessage, gc);