Updating display methods?
Hello, just a simple question thats been bugging me. Is there a standard way to update a display on a JFrame or a JPanel? So far I've gone through doing the pack and then set visible every time something changed until I realized I could skip the pack after the initial pack. However this got me wondering if there was a better way to update the display? Like say if I have a button that totally changes the display of the frame or panel, such as removing the buttong and placing another button and adding a text field or anything like that, what would be the best way to have the computer update it? setVisible? repaint? Something else?
Thanks.