posted 15 years ago
Hi Rob,
I tried the option specified by you but still could not get the required result.
To make my question more clear let us consider the example given below.
Suppose there are total 4 JPanels : mainPanel,statusInfoPanel,buttonPanel,dataPanel.
My class extends JFrame. The panels statusInfoPanel,buttonPanel and dataPanel are added to mainPanel.
Finally mainPanel is added to the JFrame.
Now, I want to change the contents of the data panel on the click of a specific button present on a buttonPanel . I will retreive the values from the database and will construct the JTable with this data and add this JTable to the dataPanel. I am trying to display the new data but could not do that. Am I missing something here? ,is dataPanel.repaint() sufficient to get the data cahange to be displayed? .
Or else do I have to construct the whole mainPanel and add it to JFrame?
Thanks.