/** * Sets the background color for the <code>Graphics2D</code> context. * The background color is used for clearing a region. * When a <code>Graphics2D</code> is constructed for a * <code>Component</code>, the background color is * inherited from the <code>Component</code>. Setting the background color * in the <code>Graphics2D</code> context only affects the subsequent * <code>clearRect</code> calls and not the background color of the * <code>Component</code>. To change the background * of the <code>Component</code>, use appropriate methods of * the <code>Component</code>. * @param color the background color that isused in * subsequent calls to <code>clearRect</code> * @see #getBackground * @see java.awt.Graphics#clearRect */ public void setBackground(Color color){ gc.setBackground(color); }
/** * Sets the background color for the <code>Graphics2D</code> context. * The background color is used for clearing a region. * When a <code>Graphics2D</code> is constructed for a * <code>Component</code>, the background color is * inherited from the <code>Component</code>. Setting the background color * in the <code>Graphics2D</code> context only affects the subsequent * <code>clearRect</code> calls and not the background color of the * <code>Component</code>. To change the background * of the <code>Component</code>, use appropriate methods of * the <code>Component</code>. * @param color the background color that isused in * subsequent calls to <code>clearRect</code> * @see #getBackground * @see java.awt.Graphics#clearRect */ public void setBackground(Color color){ gc.setBackground(color); }
/** * Sets the background color for the <code>Graphics2D</code> context. * The background color is used for clearing a region. * When a <code>Graphics2D</code> is constructed for a * <code>Component</code>, the background color is * inherited from the <code>Component</code>. Setting the background color * in the <code>Graphics2D</code> context only affects the subsequent * <code>clearRect</code> calls and not the background color of the * <code>Component</code>. To change the background * of the <code>Component</code>, use appropriate methods of * the <code>Component</code>. * @param color the background color that isused in * subsequent calls to <code>clearRect</code> * @see #getBackground * @see java.awt.Graphics#clearRect */ public void setBackground(Color color){ gc.setBackground(color); }
gc.setBackground(gcDefaults.getBackground());
gc.setBackground(gcDefaults.getBackground());