0

I have a serious problem that i need to solve today . I need to code a simple app that loads a file , read it's content create objects from these informations and add them to a linkedlist . Everything worked fine .But now i need to pass this list as an argument to a second form so i can put them in a combobox . I tryed this :

searchForm = new SearchForn();
searchForm.setListEtudiant(listEtudiantL1);
searchForm.setEnabled(true);
searchForm.setVisible(true);
searchForm.Show();

The form appears but it seems that i get nothing from the linkedlist . Thank you !

user1803551
  • 12,965
  • 5
  • 47
  • 74
  • Can you add the code of the `SearchForn` (or `SearchForm`) class? And how you fill the `listEtudiantL1` list? When asking a question about a problem caused by your code, you will get much better answers if you provide code people can use to reproduce the problem. See http://stackoverflow.com/help/mcve for more information. – Freek de Bruijn Dec 23 '15 at 11:04
  • Can you add more details to your questions and problem? – Sheetal Mohan Sharma Dec 23 '15 at 11:04
  • Well when you talked abour my SearchForm and before making you loosing time i tryed to understand how my form is working and i found the problem. I used to read the list when the object "Form" was created . But in my MainForm i'm adding the list to the searchForm after it has been created . I fixed this , thank you sooooooo much ! Sometimes we just need to be careful . – Ayman Eljahrani Dec 23 '15 at 11:07
  • Good luck with your project! – Freek de Bruijn Dec 23 '15 at 11:10
  • Don't put "SOLVED" in the title, write the solution as an answer instead. – user1803551 Dec 23 '15 at 11:10
  • See also [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/q/9554636/418556) – Andrew Thompson Dec 23 '15 at 12:08

1 Answers1

1

The problem was that i used to load the list in my searchForm before initializing it . I used a new button to initialize this list instead of initializing it in the class constructor . Thank you for your help .