~ubuntu-branches/ubuntu/oneiric/libjboss-remoting-java/oneiric

« back to all changes in this revision

Viewing changes to src/main/org/jboss/remoting/samples/chat/client/ShutDownDialog.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jboss.remoting.samples.chat.client;
 
2
 
 
3
import java.awt.*;
 
4
import javax.swing.*;
 
5
import java.awt.event.*;
 
6
 
 
7
/**
 
8
 * <p>Title: Chat4</p>
 
9
 * <p>Description: </p>
 
10
 * <p>Copyright: Copyright (c) 2003</p>
 
11
 * <p>Company: </p>
 
12
 * @author not attributable
 
13
 * @version 1.0
 
14
 */
 
15
 
 
16
public class ShutDownDialog extends JDialog {
 
17
  JPanel panel1 = new JPanel();
 
18
  JLabel jLabel1 = new JLabel();
 
19
  JLabel jLabel2 = new JLabel();
 
20
  JButton OKButton = new JButton();
 
21
  GridBagLayout gridBagLayout1 = new GridBagLayout();
 
22
 
 
23
  public ShutDownDialog(Frame frame, String title, boolean modal) {
 
24
    super(frame, title, modal);
 
25
    try {
 
26
      jbInit();
 
27
      pack();
 
28
    }
 
29
    catch(Exception ex) {
 
30
      ex.printStackTrace();
 
31
    }
 
32
  }
 
33
 
 
34
  public ShutDownDialog() {
 
35
    this(null, "", false);
 
36
  }
 
37
  private void jbInit() throws Exception {
 
38
    panel1.setLayout(gridBagLayout1);
 
39
    jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
 
40
    jLabel1.setText("Chat system is shutting down.");
 
41
    jLabel2.setFont(new java.awt.Font("Dialog", 1, 12));
 
42
    jLabel2.setText("Please try again later.");
 
43
    OKButton.setFont(new java.awt.Font("Dialog", 1, 14));
 
44
    OKButton.setText("OK");
 
45
    OKButton.addActionListener(new ShutDownDialog_OKButton_actionAdapter(this));
 
46
    getContentPane().add(panel1);
 
47
    panel1.add(jLabel1,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
 
48
            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(71, 109, 0, 84), 37, 15));
 
49
    panel1.add(jLabel2,  new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
 
50
            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(12, 134, 0, 100), 43, 3));
 
51
    panel1.add(OKButton,  new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
 
52
            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(46, 156, 96, 171), 18, -4));
 
53
  }
 
54
 
 
55
  void OKButton_actionPerformed(ActionEvent e) {
 
56
    hide();
 
57
  }
 
58
}
 
59
 
 
60
class ShutDownDialog_OKButton_actionAdapter implements java.awt.event.ActionListener {
 
61
  ShutDownDialog adaptee;
 
62
 
 
63
  ShutDownDialog_OKButton_actionAdapter(ShutDownDialog adaptee) {
 
64
    this.adaptee = adaptee;
 
65
  }
 
66
  public void actionPerformed(ActionEvent e) {
 
67
    adaptee.OKButton_actionPerformed(e);
 
68
  }
 
69
}
 
 
b'\\ No newline at end of file'