How to pass data from jdialog to jframe and refresh jframe? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to pass data from jdialog to jframe and refresh jframe?

I have a jframe with jcombobox inside that. And have a jdialog to add, remove or update jcombobox data from that. How to pass data from jdialog to jframe and refresh jcombobox?

2nd Sep 2019, 3:59 PM
hamid
hamid - avatar
6 Answers
+ 1
ok thank a lot, i try to use your help
2nd Sep 2019, 7:41 PM
hamid
hamid - avatar
0
you mean in jframe: write this code: public jframe(List){ } //////////////////////////////////// you mean in jdialog: create List of my data. and call jframe jf = new jframe(List) Right???
2nd Sep 2019, 4:27 PM
hamid
hamid - avatar
0
my combobox update from database when run app. i have a button that open jdialog. i want add data to combobox from jdialog
2nd Sep 2019, 4:48 PM
hamid
hamid - avatar
0
do you have example with code?
2nd Sep 2019, 4:48 PM
hamid
hamid - avatar
0
why not use static list in jframe and add data to this list in jdialog??
2nd Sep 2019, 7:17 PM
hamid
hamid - avatar
0
it works, just i dont know how update jcombobox after closing jdialog
2nd Sep 2019, 7:27 PM
hamid
hamid - avatar