1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.gscg.common.gui;
15
16 import info.clearthought.layout.TableLayout;
17
18 import java.awt.BorderLayout;
19 import java.awt.Color;
20
21 import javax.swing.JFrame;
22 import javax.swing.JLabel;
23 import javax.swing.JPanel;
24 import javax.swing.UIManager;
25
26 /***
27 * The Waiting Frame <br>
28 * <p>
29 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
30 * Delft, the Netherlands. All rights reserved.
31 *
32 * See for project information <a href="http://www.simulation.tudelft.nl/">
33 * www.simulation.tudelft.nl </a>.
34 *
35 * The source code and binary code of this software is proprietary information
36 * of Delft University of Technology.
37 *
38 * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
39 * Jacobs </a>
40 * @version $Revision: 1.1 $ $Date: 2005/08/03 08:52:50 $
41 * @since 1.0.0 <br>
42 */
43 public class WaitingFrame extends JFrame
44 {
45 /*** the serial version uid */
46 private static final long serialVersionUID = 11L;
47
48 /***
49 * constructs a new WaitingFrame
50 */
51 public WaitingFrame()
52 {
53 super("One moment please...");
54 try
55 {
56 UIManager
57 .setLookAndFeel("com.jgoodies.plaf.plastic.Plastic3DLookAndFeel");
58 } catch (Exception e)
59 {
60 e.printStackTrace();
61 }
62 this.setLocation(300, 300);
63 this.initialize();
64 }
65
66 /***
67 * initializes the frame
68 */
69 private void initialize()
70 {
71 double[][] layout = {{300}, {60}};
72 this.getContentPane().setLayout(new TableLayout(layout));
73 this.getContentPane().setBackground(Color.WHITE);
74
75 JPanel panel = new JPanel();
76 panel.setLayout(new BorderLayout());
77 panel.setBackground(Color.WHITE);
78 JLabel label = new JLabel("One moment please.....");
79 label.setBackground(Color.WHITE);
80 panel.add(label, BorderLayout.CENTER);
81
82 this.getContentPane().add(panel, "0,0,C,C");
83 this.setVisible(true);
84 this.setResizable(false);
85 this.pack();
86 }
87
88 /***
89 * Method main
90 *
91 * @param args command-line arguments
92 */
93 public static void main(final String[] args)
94 {
95 new WaitingFrame();
96 }
97 }