private void formMouseEvent(java.awt.event.MouseEvent evt) {                                  
        int mouseEventId = evt.getID();
        int buttonID = evt.getButton();
        int xcord = evt.getX();
        int ycord = evt.getComponent().getHeight() - evt.getY();
        long time = evt.getWhen()/1000;
        int modifiers =0;
       
        if((evt.getModifiers() & KeyEvent.SHIFT_MASK) == KeyEvent.SHIFT_MASK)
        {
             modifiers = 1 + modifiers;
        }
        if((evt.getModifiers() & KeyEvent.ALT_MASK) == KeyEvent.ALT_MASK )
        {
            modifiers = 100 + modifiers;
        }
        if((evt.getModifiers() & KeyEvent.CTRL_MASK) == KeyEvent.CTRL_MASK )
        {
            modifiers = 10 + modifiers ;
        }
        String modifiersString = Integer.toString(modifiers);
        String resultString = mouseEventId+"|"+buttonID+"|"+xcord+"|"+ycord+"|"+time+"|"+modifiers;
        //System.out.println(resultString);
        if(mouseEventId==501 || mouseEventId==502 || mouseEventId==503 || mouseEventId==506)
        {
            mouseEventHandler(resultString);
        }      
    }