private void setSubscriberDetails( String subscriberName, String subscriberAddress, String message) { this.name = subscriberName; this.address = subscriberAddress; Color color = messagePane.getForeground(); messagePane.setText( "<FONT COLOR=\"#" + Integer.toHexString(color.getRGB()).substring(2) + "\">" + messageString1 + "<p>" + namePrefix + name + nameSuffix + "<br>" + addressPrefix + address + addressSuffix + "<p>" + ((message != null && message.trim().length() > 0) ? messagePrefix + message + messageSuffix + "<p>" : "") + messageString2 + "</FONT>"); }
private void jbInit() throws Exception { border1 = BorderFactory.createEmptyBorder(20, 20, 20, 20); contentPane.setBorder(border1); contentPane.setLayout(borderLayout1); controlsPane.setLayout(gridLayout1); gridLayout1.setColumns(1); gridLayout1.setHgap(10); gridLayout1.setRows(0); gridLayout1.setVgap(10); okButton.setVerifyInputWhenFocusTarget(true); okButton.setMnemonic('O'); okButton.setText("OK"); buttonsPane.setLayout(flowLayout1); flowLayout1.setAlignment(FlowLayout.CENTER); messagePane.setEditable(false); messagePane.setText(""); borderLayout1.setHgap(10); borderLayout1.setVgap(10); this.setTitle("Subscription Authorization"); this.getContentPane().add(contentPane, BorderLayout.CENTER); contentPane.add(controlsPane, BorderLayout.SOUTH); controlsPane.add(responsesComboBox, null); controlsPane.add(buttonsPane, null); buttonsPane.add(okButton, null); contentPane.add(messageScrollPane, BorderLayout.CENTER); messageScrollPane.getViewport().add(messagePane, null); }