JAVA GUI help

Hi,

I need help with java gui.

I want to know how to update content on a gui. for example you click a button and then the content is changed on the gui.

Thanks.

Any specific example or code that you need help with?