Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public class PreloaderDialog extends JDialog {
  2.  
  3. publicPreloaderDialog() {
  4.  
  5. initialize();
  6. }
  7.  
  8. public final void initialize() {
  9.  
  10. JLabel waittext = new JLabel("Wait, please");
  11. add(waittext);
  12.  
  13. setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
  14. setModalityType(ModalityType.APPLICATION_MODAL);
  15.  
  16. setTitle("Loading in progress");
  17.  
  18. setLocationRelativeTo(null);
  19. setSize(300, 120);
  20. }
  21.  
  22. public void hide() {
  23.  
  24. setVisible(false);
  25. }
  26.  
  27. public void show() {
  28.  
  29. setVisible(true);
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement