-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuiLoading.java
More file actions
53 lines (49 loc) · 1.38 KB
/
GuiLoading.java
File metadata and controls
53 lines (49 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
*@file AuthorManager.java
*File to show the Loading Screen
*@author Abhinav Khattar 2015120
*@author Tushar Arora 2015107
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.text.*;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
/**Shows Loading*/
public class GuiLoading
{
private JFrame loadingFrame;
private JPanel loadingPanel;
private JLabel loadingLabel;
public GuiLoading()
{
System.out.println("Gui Loading");
loadingFrame=new JFrame("Loading");
loadingFrame.setSize(250,40);
loadingFrame.setLocation(600,270);
loadingFrame.setResizable(false);
loadingFrame.setLayout(new BoxLayout (loadingFrame.getContentPane(), BoxLayout.Y_AXIS));
loadingFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
loadingPanel=new JPanel();
loadingLabel=new JLabel("<html><b>Loading... Please Wait</b></html>",JLabel.CENTER);
loadingLabel.setFont(new Font("Calibri", Font.PLAIN, 15));
loadingLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
loadingPanel.add(Box.createRigidArea(new Dimension(20,7)));
loadingPanel.add(loadingLabel);
loadingPanel.setVisible(true);
loadingFrame.add(loadingPanel);
}
public void start()
{
loadingFrame.setVisible(true);
}
public void stop()
{
loadingFrame.setVisible(false);
}
}