Bonjour tout le monde.
J'ai un probleme de detection d'evenement sur un panel integeré dans un autre panel.
en fait Dans mon premeir panel j'ai un buoton qui ouvre le browseur pour selectionner un repertoire
apres il met la valeur dans un JTextField

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 
 
public class PathSelectionPanel extends JPanel implements ActionListener
{
    private JTextField textField;
    private JButton browseButton;
    public PathSelectionPanel()
    {
        super();
        createLayout();
    }
    protected void createLayout()
    {
        GridBagLayout layout = new GridBagLayout();
 
        setLayout(layout);
        textField = new JTextField(idata.getInstallPath(), 30);
        textField.addActionListener(this);
        parent.setInitialFocus(textField);
        GridBagConstraints gbConstraints = new GridBagConstraints();
        parent.getInstallerFrame().buildConstraints(gbConstraints, 0, 1,
                GridBagConstraints.RELATIVE, 1, 1.0, 0.0);
        gbConstraints.fill = GridBagConstraints.HORIZONTAL;
        gbConstraints.anchor = GridBagConstraints.WEST;
        gbConstraints.insets = new Insets(0, 0, 0, 10);
        layout.addLayoutComponent(textField, gbConstraints);
        add(textField);
 
        browseButton = ButtonFactory.createButton();
        browseButton.addActionListener(this);
 
        gbConstraints.insets = new Insets(0, 0, 0, 5);
        layout.addLayoutComponent(browseButton, gbConstraints);
        add(browseButton);
    }    
    public void actionPerformed(ActionEvent e)
    {
        Object source = e.getSource();
                if (source == browseButton)
        {
            JFileChooser fc = new JFileChooser();
            fc.setLocale(new Locale(idata.localeISO3));
            fc.setCurrentDirectory(new File(textField.getText()));
            fc.setMultiSelectionEnabled(false);
            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            fc.addChoosableFileFilter(fc.getAcceptAllFileFilter());
            if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
            {
                String path = fc.getSelectedFile().getAbsolutePath();
                textField.setText(path);
            }
 
        }
        else
        {
            if (parent instanceof ActionListener) ((ActionListener) parent).actionPerformed(e);
        }
    }
    public String getPath()
    {
        return (textField.getText());
    }
    public void setPath(String path)
    {
        textField.setText(path);
    }
    public JTextField getPathInputField()
    {
        return textField;
    }
    public JButton getBrowseButton()
    {
        return browseButton;
    }
 
}
dans mon deuxieme panel je met le premeir panel et autre controles :
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
31
 
public class PathInputPanel extends JPanel implements ActionListener {
 
protected PathSelectionPanel pathSelectionPanel;
protected JRadioButton jRadioStd;
protected JRadioButton jRadioFull;
public PathInputPanel() {
...
ButtonGroup myBG = new ButtonGroup();
myBG.add(getJRadioStd());
myBG.add(getJRadioFull());
getJRadioStd().addActionListener(this);
getJRadioFull().addActionListener(this);
add(getJRadioStd(), gbConstraint);
add(getJRadioFull(), gbConstraint);
add(getPathSelectionPanel(), gbConstraint);	
}
 
public void actionPerformed(ActionEvent e) {
   Object source = e.getSource();
 
   if (source == pathSelectionPanel.getPathInputField()) {
      traitement1();
   } else if (source == getJRadioStd()) {
      traitement2()					           
   } else if (source == getJRadioFull()) {
      traitement3()
   }
 
}
}
Le probleme est que l'action performed ne detecte que les evenement sur le radio button.
je veux savoir comment detecter l'evenement sur le changement de la valeur du PathInputField depuis mon deuxieme panel PathInputPanel

Merci d'avance