Guest User

Untitled

a guest
Nov 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. class MyThreads extends Thread {
  2. Authorization reglog;
  3. Graphics g;
  4. Dimension dim;
  5. SimpleWind s;
  6.  
  7. public MyThreads(SimpleWind draw){
  8. g = draw.getGraphics();
  9. dim = draw.getSize();
  10. s = draw;
  11. }
  12.  
  13. public void run(){
  14. String result = null;
  15.  
  16.  
  17. for(int i = 0;;i++){
  18. boolean resultOfAuthorization = reglog.getResultOfAuthorization();
  19.  
  20. if(resultOfAuthorization==true){
  21. result = "Succesfully entered";
  22. }
  23.  
  24. if(resultOfAuthorization== false){
  25. result = "You are not entered yet.";
  26. }
  27.  
  28. g.drawString(result, i, 50);
  29. s.repaint();
  30.  
  31. try {
  32. this.sleep(100);
  33. } catch (InterruptedException ex) {
  34. }
  35.  
  36. }
  37. }
  38. }
Add Comment
Please, Sign In to add comment