Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyThreads extends Thread {
- Authorization reglog;
- Graphics g;
- Dimension dim;
- SimpleWind s;
- public MyThreads(SimpleWind draw){
- g = draw.getGraphics();
- dim = draw.getSize();
- s = draw;
- }
- public void run(){
- String result = null;
- for(int i = 0;;i++){
- boolean resultOfAuthorization = reglog.getResultOfAuthorization();
- if(resultOfAuthorization==true){
- result = "Succesfully entered";
- }
- if(resultOfAuthorization== false){
- result = "You are not entered yet.";
- }
- g.drawString(result, i, 50);
- s.repaint();
- try {
- this.sleep(100);
- } catch (InterruptedException ex) {
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment