2 *******************************************************************************
\r
3 * Copyright (C) 2001-2007, International Business Machines Corporation and *
\r
4 * others. All Rights Reserved. *
\r
5 *******************************************************************************
\r
7 package com.ibm.icu.dev.demo.translit;
\r
8 import java.awt.event.*;
\r
10 public class InfoDialog extends Dialog {
\r
14 private static final long serialVersionUID = -3086665546137919018L;
\r
15 protected Button button;
\r
16 protected TextArea area;
\r
17 protected Dialog me;
\r
18 protected Panel bottom;
\r
20 public TextArea getArea() {
\r
24 public Panel getBottom() {
\r
28 InfoDialog(Frame parent, String title, String label, String message) {
\r
29 super(parent, title, false);
\r
31 this.setLayout(new BorderLayout());
\r
32 if (label.length() != 0) {
\r
33 this.add("North", new Label(label));
\r
36 area = new TextArea(message, 8, 80, TextArea.SCROLLBARS_VERTICAL_ONLY);
\r
37 this.add("Center", area);
\r
39 button = new Button("Hide");
\r
40 button.addActionListener(new ActionListener() {
\r
41 public void actionPerformed(ActionEvent e) {
\r
45 bottom = new Panel();
\r
46 bottom.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
\r
48 this.add("South", bottom);
\r
50 addWindowListener(new WindowAdapter() {
\r
51 public void windowClosing(WindowEvent e) {
\r