aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommOpaquePanelUI.java
blob: 6c11b36698695d9f74294e3a3fa9824104dce238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.gui.lookandfeel;

import java.awt.*;

import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;

/**
 * @author Yana Stamcheva
 */
public class SIPCommOpaquePanelUI
    extends BasicPanelUI
{
    public static ComponentUI createUI(JComponent c)
    {
        return new SIPCommOpaquePanelUI();
    }

    @Override
    public void paint(Graphics g, JComponent c)
    {
        super.paint(g, c);

        Color defaultColor = UIManager.getColor("Panel.background");
        int red = defaultColor.getRed();
        int green = defaultColor.getGreen();
        int blue = defaultColor.getBlue();

        g.setColor(new Color(red, green, blue));

        g.fillRect(0, 0, c.getWidth(), c.getHeight());
    }
}