40 |
|
|
41 |
import java.awt.Dimension; |
import java.awt.Dimension; |
42 |
import java.awt.Graphics; |
import java.awt.Graphics; |
43 |
|
import java.awt.Rectangle; |
44 |
|
|
45 |
import javax.accessibility.Accessible; |
import javax.accessibility.Accessible; |
46 |
import javax.swing.JComponent; |
import javax.swing.JComponent; |
183 |
if (c.isOpaque()) |
if (c.isOpaque()) |
184 |
{ |
{ |
185 |
g.setColor(c.getBackground()); |
g.setColor(c.getBackground()); |
186 |
g.fillRect(0, 0, c.getWidth(), c.getHeight()); |
Rectangle clip = g.getClipBounds(); |
187 |
|
g.fillRect(clip.x, clip.y, clip.width, clip.height); |
188 |
} |
} |
189 |
paint(g, c); |
paint(g, c); |
190 |
} |
} |
191 |
|
|
|
|
|
192 |
/** |
/** |
193 |
* Determines the preferred size of a component. The default |
* Determines the preferred size of a component. The default |
194 |
* implementation returns <code>null</code>, which means that |
* implementation returns <code>null</code>, which means that |