public Message ViewMessage (int id)
   {
       
        String requete = "select * from message where Id='"+id+"'";
        Message msg =new Message();
        try {
             Statement statement = MyConnection.getInstance()
                   .createStatement();
            
            ResultSet resultat = statement.executeQuery(requete);
             if(resultat.next()){
  
     
                msg.setId_message(resultat.getInt(1));
                msg.setFrom(resultat.getString(2));
                msg.setTo(resultat.getString(3));
                msg.setObject(resultat.getString(4));
                msg.setContent(resultat.getString(5));
                
             }
        } catch (SQLException ex) {
           //Logger.getLogger(PersonneDao.class.getName()).log(Level.SEVERE, null, ex);
            System.out.println("erreur lors du chargement des depots "+ex.getMessage());
        }
                    System.out.println(msg.getFrom());  

            return msg;
   }