// Create Address panel
StringTokenizer tokens = new StringTokenizer(Pooka.getProperty("MessageWindow.Input.DefaultFields", "To:CC:BCC:Subject"), ":");
String currentHeader = null;
JLabel hdrLabel = null;
EntryTextArea inputField = null;
while (tokens.hasMoreTokens()) {
inputRow = new Box(BoxLayout.X_AXIS);
currentHeader=tokens.nextToken();
hdrLabel = new JLabel(Pooka.getProperty("MessageWindow.Input.." + currentHeader + ".label", currentHeader) + ":", SwingConstants.RIGHT);
hdrLabel.setPreferredSize(new Dimension(75,hdrLabel.getPreferredSize().height));
inputRow.add(hdrLabel);
if (currentHeader.equalsIgnoreCase("To") || currentHeader.equalsIgnoreCase("CC") || currentHeader.equalsIgnoreCase("BCC") ) {
try {
inputField = new AddressEntryTextArea(getNewMessageUI(), getNewMessageProxy().getNewMessageInfo().getHeader(Pooka.getProperty("MessageWindow.Input." + currentHeader + ".MIMEHeader", "") , ","), 1, 30);
} catch (MessagingException me) {
inputField = new net.suberic.util.swing.EntryTextArea(1, 30);
}
} else {
try {
inputField = new net.suberic.util.swing.EntryTextArea(getNewMessageProxy().getNewMessageInfo().getHeader(Pooka.getProperty("MessageWindow.Input." + currentHeader + ".MIMEHeader", "") , ","), 1, 30);
} catch (MessagingException me) {
inputField = new net.suberic.util.swing.EntryTextArea(1, 30);
}
}
inputField.setLineWrap(true);
inputField.setWrapStyleWord(true);
inputField.setBorder(BorderFactory.createEtchedBorder());
inputField.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) {
setModified(true);
}
});