2016-4-7 21:07:37更新;
窗口设置背景颜色的两种方法:

  1. jf.getContentPane().setBackground(Color.red);
    getContentPane
    public Container getContentPane()返回此窗体的 contentPane 对象
    指定者:
    接口 RootPaneContainer 中的 getContentPane
    返回:
    contentPane 属性
    另请参见:
    setContentPane(java.awt.Container), RootPaneContainer.getContentPane()
    //返回的是什么鬼。我也不知道。
  2. jf.setBackground(Color.red);
    jf.getContentPane().setVisible(false);

    //应该是有什么东西覆盖在窗口上,所以要么给附在上面的东西上色,要么隐藏上面的东西。