Alright. So I have a JFrame
, and it has a JLabel
. I call the JFrame
, and it displays properly (with 开发者_Go百科the label). So now I want to call an updater to "update" the JFrame
to add more buttons and crap. How can I do this WITHOUT having to open up a new JFrame
?
You need to call JFrame.invalidate()
first, then call JFrame.validate().
public void invalidate()
Invalidates the container. The container and all parents above it are marked as needing to be laid out.
精彩评论