in src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java [498:555]
private UserNamePasswordDialog(Frame containerFrame) {
super(containerFrame, "Login", true);
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.fill = GridBagConstraints.NONE;
gc.anchor = GridBagConstraints.NORTH;
gc.gridx = 0;
gc.gridy = 0;
gc.gridwidth = 3;
gc.insets = new Insets(7, 7, 7, 7);
panel.add(new JLabel("URI: " + getFileURL()), gc);
gc.gridx = 0;
gc.gridy = 1;
gc.gridwidth = 1;
gc.insets = new Insets(2, 2, 2, 2);
panel.add(new JLabel("Username"), gc);
gc.gridx = 1;
gc.gridy = 1;
gc.gridwidth = 2;
gc.weightx = 1.0;
gc.fill = GridBagConstraints.HORIZONTAL;
final JTextField userNameTextField = new JTextField(15);
panel.add(userNameTextField, gc);
gc.gridx = 0;
gc.gridy = 2;
gc.gridwidth = 1;
gc.fill = GridBagConstraints.NONE;
panel.add(new JLabel("Password"), gc);
gc.gridx = 1;
gc.gridy = 2;
gc.gridwidth = 2;
gc.fill = GridBagConstraints.HORIZONTAL;
final JPasswordField passwordTextField = new JPasswordField(15);
panel.add(passwordTextField, gc);
gc.gridy = 3;
gc.anchor = GridBagConstraints.SOUTH;
gc.fill = GridBagConstraints.NONE;
JButton submitButton = new JButton(" Submit ");
panel.add(submitButton, gc);
getContentPane().add(panel);
submitButton.addActionListener(evt -> {
userName = userNameTextField.getText();
password = passwordTextField.getPassword();
getContentPane().setVisible(false);
UserNamePasswordDialog.this.dispose();
});
}