175 |
// reparent c |
// reparent c |
176 |
addImpl(c, null, 0); |
addImpl(c, null, 0); |
177 |
|
|
178 |
|
Rectangle oldClip = graphics.getClipBounds(); |
179 |
// translate to (x,y) |
// translate to (x,y) |
180 |
graphics.translate(x, y); |
graphics.translate(x, y); |
181 |
|
graphics.clipRect(0, 0, w, h); |
182 |
// set bounds of c |
// set bounds of c |
183 |
c.setBounds(0, 0, w, h); |
c.setBounds(0, 0, w, h); |
184 |
|
|
193 |
|
|
194 |
// untranslate g |
// untranslate g |
195 |
graphics.translate(-x, -y); |
graphics.translate(-x, -y); |
196 |
|
graphics.setClip(oldClip); |
197 |
} // paintComponent() |
} // paintComponent() |
198 |
|
|
199 |
/** |
/** |