Hey fellows, I have a few panels in one frame: jpAll, jpMain and jpBottom.
I'm trying to figure out how to click a button in jpBottom and update the content in jpMain?? So far the only way I've figured is to kill the current frame and open a new frame...I don't like that idea.
Currently, what I have tried for that button's event handler (jbtNext) is assigning jpMain to null and then trying whatever I thought would refresh the panel's content (repaint(), jpMain.validate, jpMain.setVisible()).
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == jbtNext)
{
jpMain = null;
repaint();
jpMain.validate();
jpMain.doLayout();
jpMain.setVisible();
}
}
Lastly, I tried overriding the paintComponent() method and copying some of the code above (such as jpMain.validate()), and I got the same results.
I'm having a hard time finding comprehensive work/books about GUIs. Feel free to suggest books thx.
Edited by: djpme on Jun 30, 2008 4:57 PM
Edited by: djpme on Jun 30, 2008 4:58 PM