Icon avatarIcon = ImagesManager.getInstance().getIcon("avatar.gif");
Icon avatarIcon = ImagesManager.getInstance().getIcon("avatar3.gif");
    public MessagePanel()    {        super();        this.setLayout(new BorderLayout());        this.setBackground(Color.WHITE);        // mise en forme du l'avatar        Icon avatarIcon = ImagesManager.getInstance().getIcon("avatar.gif");        this.avatar = new JLabel("", avatarIcon, JLabel.LEFT);        JPanel iconPanel = new JPanel();        iconPanel.setLayout(new BorderLayout());        iconPanel.setOpaque(false);        iconPanel.add(this.avatar,BorderLayout.SOUTH);        this.add(iconPanel, BorderLayout.WEST);        // mise en forme du message        this.messageArea = new JEditorPane();        this.messageArea.setEditable(false);        this.messageArea.setOpaque(false);        this.messageArea.setContentType("text/html");        this.messageArea.setFocusable(false);        // panneaux utilis pour         JPanel messagePanel = new JPanel();        messagePanel.setLayout(new BorderLayout());        messagePanel.setOpaque(false);        messagePanel.setBorder(new BalloonBorder());        messagePanel.add(this.messageArea);        messagePanel.add(this.messageArea);        JPanel layoutPanel = new JPanel(new BorderLayout());        layoutPanel.setOpaque(false);        layoutPanel.add(messagePanel, BorderLayout.CENTER);        layoutPanel.add(Box.createVerticalStrut(avatarIcon.getIconHeight()/2),BorderLayout.SOUTH);        this.add(layoutPanel, BorderLayout.CENTER);        //mise en page        int borderSize = 7;        // ajout d'une glue pour laisser aerer au dessus        this.add(Box.createVerticalStrut(borderSize), BorderLayout.NORTH);        // ajout d'une glue pour laisser aerer sur le cot        this.add(Box.createHorizontalStrut(borderSize), BorderLayout.EAST);        // ajout d'une glue pour laisser aerer en dessous        this.add(Box.createVerticalStrut(borderSize), BorderLayout.SOUTH);    }