voila le code
si qulqu'un peut le regler :
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Cadre3 extends JFrame {
// JPanel contentPane;
JPanel formu = new JPanel ();
JScrollPane scroll = new JScrollPane(formu);
JLabel jLabel1 = new JLabel();
JTextPane jTextPane1 = new JTextPane();
JButton jButton1 = new JButton();
JLabel jLabel2 = new JLabel();
JTextPane jTextPane2 = new JTextPane();
//Construire le cadre
public Cadre3() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Initialiser le composant
private void jbInit() throws Exception {
//contentPane = (JPanel) this.getContentPane();
// contentPane.setLayout(null);
this.setSize(new Dimension(765, 586));
this.setTitle("Titre du cadre");
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
formu.setLayout(null);
jLabel1.setText("jLabel1");
jLabel1.setBounds(new Rectangle(313, 113, 109, 42));
jTextPane1.setText("jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1j" +
"TextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1");
jTextPane1.setBounds(new Rectangle(557, 156, 231, 81));
jButton1.setBounds(new Rectangle(502, 58, 113, 28));
jButton1.setText("jButton1");
jLabel2.setText("jLabel2");
jLabel2.setBounds(new Rectangle(390, 361, 105, 29));
jTextPane2.setText("jTextPane2jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1j" +
"TextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1jTextPane1");
jTextPane2.setBounds(new Rectangle(591, 475, 107, 139));
getContentPane().add(scroll);
scroll.getViewport().add(formu, null);
formu.add(jLabel1, null);
formu.add(jTextPane1, null);
formu.add(jButton1, null);
formu.add(jLabel2, null);
formu.add(jTextPane2, null);
}
//Redéfini, ainsi nous pouvons sortir quand la fenêtre est fermée
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}
}
MERCI
% Mauvais Sens %