I created a frame x1 that has a p1 panel. When x1 loads, flags are added dynamically to p1. The number of flags added to p1 depends on the number of data values ββin the database table (t1) that satisfy certain criteria.
In frame x1 there is a button b1. When b1 is clicked, it displays another x2 frame in which the data values ββof the database table t1 can be changed. The "update" button in x2 updates t1 to reflect the changes made to its data values.
After the change, when x2 closes, I want the p1 panel in frame x1 to be updated automatically to reflect the changes made to the database, that is, the number of data values ββthat meet the criteria could change after modifying t1 to x2 and therefore the number The flags that will be displayed on p1 can also change.
How to update and reload p1 panel components in x1 from x2.
I wonder if anyone can help me fix the problem. Thanks in advance and sorry for loading the text into the question.
In x2: private void UPDATEActionPerformed(java.awt.event.ActionEvent evt) {
source share