_ownerComponent = owner_;
setLayout(new BorderLayout());
JPanel northpan = new JPanel();
northpan.setBorder(new EmptyBorder(2,2,1,2));
JPanel messagepanel = new JPanel();
if (message_ instanceof String) {
messagepanel.add(new JLabel((String) message_));
}
else if (message_ instanceof Object[]) {
messagepanel.setLayout(
new BoxLayout(getOwner(), BoxLayout.Y_AXIS));
Object[] objects = (Object[]) message_;
for (int i=0; i<objects.length; i++) {
messagepanel.add(new JLabel(objects[i].toString()));
}
}
else {
throw new IllegalArgumentException("illegal message type " +
message_.getClass().getName());
}
northpan.add(messagepanel);
add(northpan, BorderLayout.NORTH);
if (_wantsInput) {
JPanel centerpan = new JPanel();
centerpan.setBorder(new EmptyBorder(1, 1, 1, 1));
_inputField = new JTextField(_inputValue, 20);
_inputField.addActionListener(this);
centerpan.add(_inputField);
add(centerpan, BorderLayout.CENTER);
}