// Setup the layout:
super();
GridBagLayout gb = new GridBagLayout();
setLayout(gb);
// Create the title label:
HttpChallenge challenge = (request.hasProxy()
? reply.getProxyAuthenticate()
: reply.getWWWAuthenticate());
Label label = new Label(challenge.getScheme()
+ " authentication for "
+ challenge.getAuthParameter("realm"));
GridBagConstraints row = new GridBagConstraints();
row.gridwidth = GridBagConstraints.REMAINDER;
row.anchor = GridBagConstraints.WEST;
gb.setConstraints(label, row);
add(label);