frame background colour
how to give backgr开发者_如何学JAVAound colour in a frame using java swing?
Read the section from the Swing tutorial on Using Top Level Container. It explains the structure of the frame. In general the "content pane" is used to hold the components you add to the frame. So you need to set the background of the content pane, not the frame.
Did you try JComponent.setBackground(Color c)?
精彩评论