Sorry.... i have posted this question before in JavaRanch Forum but i did not get any satisfactory answer to my question. probably no one notices there. I am posting here with the hope that someone will come forward and give me some suggestion.
i am using java swing and i have JPanels in cardlayout. And when i click a JMenuItem then it displays the respective JPanel for that JMenuItem. But my problem is that i could not able to refresh that particular JPanel.....
In each JPanels(in cardlayout) there are JLabels and Graphs containing database values. Now my problem is that when i select different menuItems it displays the required JPanels, but it leaves the previous JPanel in that state in which i left.....
Let me explain properly.... For example in one JPanel there is a combobox, having list of Temperature, Rainfall, Wind. Now at first it displays Temperature Graph and if i select Rainfall then it displays Rainfall Graph. Working fine.... Now if i select another JMenuItem then it takes me to the respective JPanel, but it leaves the JPanel in that state where i left i.e when i again select JMenuItem (for that JPanel) then i found the JPanel with the Rainfall Graph but i need the JPanel with the Temperature Graph..... i.e the JPanels must be refreshed at each switching (of JPanels), by selecting JMenuItem
Probably i could explain you properly..... please give me some suggestion....