简体   繁体   中英

Calling jButton action of previous java file from new java file

Firstly a JFrame GUI opens containing JTable and 2 JButtons viz "Display" and 2nd Button "Details". When i press "Display" button few of the informations will be displayed in the JTable , now when i press "Details" button a new Java JFrame file is called and a new window opens(keeping first window open) with a JButton "Save" and few other components Textarea etc where i make few modifications and press "Save" button , now when i press "Save" button i want the "Display" button actionPerformed also to be called which is present in first frame (which is already running) So that modifications made in second frame information reflects in JTable of first frame. How can i do this?

Uh, assuming I understand - just call the Display button's actionPerformed function after saving? Buttons are "final" if I remember correctly, you should be able to do that. Could you provide a code example or elaborate more on what you want to do?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM