This example wil extend the previous example. It will use Container class to change the Background of the frame. In order to change the Background we need to access the content pane of a frame. A frame's content pane is the designated are which does not include title, menu bar and the border of the frame. It is the area where we can display content like text, image etc. We access the content pane of a frame by calling frames's getContentPane method and to change the background we will content panes's setBackground method.
Post a Comment