package voxo.client.views.components;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GraphicsEnvironment;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
@SuppressWarnings("serial")
public class CustomWait extends JFrame{
public CustomWait(String name) {
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
try{
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
}
catch(Exception ex){
}
JLabel j = new JLabel("Waiting for " + name);
j.setIcon( new ImageIcon("resources/images/ajax-loader.gif"));
j.setBackground(Color.LIGHT_GRAY);
j.setHorizontalAlignment(SwingConstants.CENTER);
setResizable(false);
setAlwaysOnTop(true);
setLocation(((e.getMaximumWindowBounds().width-200+e.getMaximumWindowBounds().x)/2), ((e.getMaximumWindowBounds().height-70+e.getMaximumWindowBounds().y)/2));
setSize(new Dimension(200, 80));
this.add(j);
}
}