Karan Malhotra
Karan Malhotra

Reputation: 145

focus from JTable is not losting even after frame is dispoed in java?

i have two frame. and there is a button on frame 1st which opens 2nd frame.

note -- frame 1st is still open. when we open 2nd frame

and 2nd frame have textfields and table and button(update) to update the row. and when i click on row in table . then all column value of that row go to their respective textfields. but when i close the frame *after clicking on table row * and open the 2nd frame again from the frame 1st . then that row is still selected and all the textfields are filled with that row value. and update button also don't work.

but when i close all frame and run the frame again it works fine

Upvotes: 0

Views: 35

Answers (1)

Karan Malhotra
Karan Malhotra

Reputation: 145

@pero

Removed static from frame and JTable. And it works.

Upvotes: 1

Related Questions