- public void update(Graphics g) {
- if (dbImage == null) {
- dbImage = createImage(this.getSize().width, this.getSize().height);
- dbg = dbImage.getGraphics();
- }
- dbg.setColor(getBackground());
- dbg.fillRect(0, 0, this.getSize().width, this.getSize().height);
- dbg.setColor(getForeground());
- paint(dbg);
- g.drawImage(dbImage, 0, 0, this);
- }
- private Image dbImage;
- private Graphics dbg;

By: Guest | Date: Jul 1 2010 10:29 | Format: None | Expires: never | Size: 413 B | Hits: 879
Latest pastes
1 hours ago
2 hours ago
2 hours ago
3 hours ago
6 hours ago