17 package com.generalrobotix.ui.util;
20 import java.awt.event.*;
36 public AlertBox(Frame owner, String title,
int messageType,
int buttonType) {
38 _init(title, messageType, buttonType);
40 public AlertBox(Dialog owner, String title,
int messageType,
int buttonType) {
42 _init(title, messageType, buttonType);
45 private void _init(String title,
int messageType,
int buttonType) {
53 message_ =
new JTextArea();
54 message_.setOpaque(
false);
55 message_.setEditable(
false);
56 message_.setForeground(
caption_.getForeground());
63 gbc_ =
new GridBagConstraints();
66 public void actionPerformed(ActionEvent evt) {
70 SwingUtilities.invokeLater(
86 options_ =
new Object[] { okButton };
112 mainPanel_.add(message_, BorderLayout.CENTER);
117 JOptionPane optionPane =
new JOptionPane(
120 JOptionPane.DEFAULT_OPTION,
140 message_.setText(message);