Hello All,

I am stuck in one issue.

When I update a value in one tab of a JTabbedPane, the same value does not get updated in the other tab

I tried using the StateChange event but still did not succeed.

I need to refresh the second tab as soon as any changes are saved in the forst tab.

Please help me in this.

Thanks in advance.
Pooja

Recommended Answers

Updating the value of what? A JTextField? A JLabel?
Put (the proper) listener on whatever item is being changed,
to go and update the item on the other tab page.

Jump to Post

All 2 Replies

Member Avatar

Updating the value of what? A JTextField? A JLabel?
Put (the proper) listener on whatever item is being changed,
to go and update the item on the other tab page.

Updating the value of what? A JTextField? A JLabel?
Put (the proper) listener on whatever item is being changed,
to go and update the item on the other tab page.

In the next Tab I am having a JTable.
The values in the JTable are fetched from the database.
The database is getting updated correctly when the value is changed in the earlier tab but not getting reflected in the JTable at the very first time.
I need to refresh the page when I click on the second tab.

How should I do this?
I had added the listener also to the JTabbedPane.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.