Sorry for my english, i'm not good enough.
Well, at the moment i have a conception problem because i have a cross reference in my code, and i want to know if i can do something else.
I have a frame :
public class JFrameVcView extends JFrame {
...
private void init() {
...
JButton jButtonFilter = new JButton(new FilterAction(this, "Filter"));
...
}
}
My FilterAction class look likes :
public class FilterAction extends AbstractAction {
private final JFrameVcView fenetre;
private final List<JTextField> textFieldList;
public FilterAction(JFrameVcView fenetre, String texte) {
super(texte);
this.fenetre = fenetre;
this.textFieldList = fenetre.getTextFieldList();
}
@Override
public void actionPerformed(ActionEvent e) {
for (JTextField jtf : textFieldList) {
System.out.println("name : " + jtf.getName() + " value : " + jtf.getText());
}
}
}
As you see my action get a reference on JFrameVcView, but it's JFrameVcView who call this action. So I think it's not a good solution. By the way I'm blocked, I can't find how can I do.
Thanks. Shoxolat.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)