Salut je code une applet sur la quelle j'ajoute un JPAnel (haut), j'aimerais que ce JPanel me serve a ecrire du texte(texte), j'ai fait un premier essaie en mettant un texte dans le JLAbel mais rien ne s'affiche :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   public void init() {
        // TODO start asynchronous download of heavy resources
        this.idChat=Integer.parseInt(getParameter("idChat"));
        this.idUtilisateur=Integer.parseInt(getParameter("idUtilisateur"));
        this.port=Integer.parseInt(getParameter("port"));
        this.getContentPane().setBackground(new Color(0xd3d9f2));
        bas=new JPanel();
        haut=new JPanel();
        scroll=new JScrollPane(haut);
        jtf=new JTextField();
        texte=new JLabel("Salut les copains !!!!!!!!!!!");
        //area=new JTextArea("Please wait...",20, 50);
        Font policeA=new Font("Arial", Font.BOLD, 11);
        //area.setFont(policeA);
        //area.setPreferredSize(new Dimension(600,350));
        //haut.add(area, BorderLayout.CENTER);
        Font police=new Font("Verdana", Font.BOLD, 12);
        jtf.setFont(police);
        jtf.setForeground(new Color(0x006cfb));
        jtf.setPreferredSize(new Dimension(450,30));
        jtf.addKeyListener(new ClavierListener());
        bas.setBackground(new Color(0xc0c8e9));
        haut.setBackground(new Color(0xb8b5c7));
        bas.add(jtf, BorderLayout.WEST);
        haut.add(texte, BorderLayout.CENTER);
        this.getContentPane().add(bas, BorderLayout.SOUTH);
        this.getContentPane().add(haut, BorderLayout.CENTER);
        this.getContentPane().add(scroll, BorderLayout.CENTER);
        jtf.requestFocus();
    }
Merci pour votre aide !