2 *******************************************************************************
\r
3 * Copyright (C) 2001-2010, 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.BorderLayout;
\r
9 import java.awt.Button;
\r
10 import java.awt.Dialog;
\r
11 import java.awt.FlowLayout;
\r
12 import java.awt.Frame;
\r
13 import java.awt.Label;
\r
14 import java.awt.Panel;
\r
15 import java.awt.TextArea;
\r
16 import java.awt.event.ActionEvent;
\r
17 import java.awt.event.ActionListener;
\r
18 import java.awt.event.WindowAdapter;
\r
19 import java.awt.event.WindowEvent;
\r
20 public class InfoDialog extends Dialog {
\r
24 private static final long serialVersionUID = -3086665546137919018L;
\r
25 protected Button button;
\r
26 protected TextArea area;
\r
27 protected Dialog me;
\r
28 protected Panel bottom;
\r
30 public TextArea getArea() {
\r
34 public Panel getBottom() {
\r
38 InfoDialog(Frame parent, String title, String label, String message) {
\r
39 super(parent, title, false);
\r
41 this.setLayout(new BorderLayout());
\r
42 if (label.length() != 0) {
\r
43 this.add("North", new Label(label));
\r
46 area = new TextArea(message, 8, 80, TextArea.SCROLLBARS_VERTICAL_ONLY);
\r
47 this.add("Center", area);
\r
49 button = new Button("Hide");
\r
50 button.addActionListener(new ActionListener() {
\r
51 public void actionPerformed(ActionEvent e) {
\r
55 bottom = new Panel();
\r
56 bottom.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
\r
58 this.add("South", bottom);
\r
60 addWindowListener(new WindowAdapter() {
\r
61 public void windowClosing(WindowEvent e) {
\r