public void ding()
    {
        class temp2 implements Runnable
        {
            int screen_width = Toolkit.getDefaultToolkit().getScreenSize().width;  
            int screen_height = Toolkit.getDefaultToolkit().getScreenSize().height;  
            @Override            
            public void run()
            {
                try {
                    chatRoom.setVisible(true);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    chatRoom.setVisible(false);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    setLocation((screen_width - getWidth()) / 2 + 50 ,(screen_height - getHeight()) / 2 + 50);
                    chatRoom.setVisible(true);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    chatRoom.setVisible(false);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    setLocation((screen_width - getWidth()) / 2 - 50 ,(screen_height - getHeight()) / 2 - 50);
                    chatRoom.setVisible(true);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    chatRoom.setVisible(false);
                    try {
                        sleep(115);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    setLocation((screen_width - getWidth()) / 2 ,(screen_height - getHeight()) / 2 );
                    chatRoom.setVisible(true);
                    File file = new File("..\\Client\\src\\picture\\6.wav");
                    AudioInputStream sound = AudioSystem.getAudioInputStream(file);
                    DataLine.Info info = new DataLine.Info(Clip.class,sound.getFormat());
                    Clip player = (Clip)AudioSystem.getLine(info);
                    player.open(sound);
                    player.start();
                } catch (LineUnavailableException ex) {
                    Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IOException ex) {
                    Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                } catch (UnsupportedAudioFileException ex) {
                    Logger.getLogger(ChatRoom.class.getName()).log(Level.SEVERE, null, ex);
                }
           }
        }
        SwingUtilities.invokeLater(new temp2());
    }