1 19 20 21 package org.netbeans.modules.form.fakepeer; 22 23 import java.awt.*; 24 25 29 class FakePanelPeer extends FakeContainerPeer 30 { 31 FakePanelPeer(Panel target) { 32 super(target); 33 } 34 35 Component createDelegate() { 36 return new Delegate(); 37 } 38 39 43 private class Delegate extends Component 44 { 45 Delegate() { 46 this.setBackground(SystemColor.window); 47 this.setForeground(SystemColor.windowText); 48 } 49 50 public void paint(Graphics g) { 51 Dimension sz = _target.getSize(); 52 53 Color c = _target.getBackground(); 54 if (c == null) 55 c = SystemColor.window; 56 g.setColor(c); 57 58 g.fillRect(0, 0, sz.width, sz.height); 59 } 60 } 61 } 62 | Popular Tags |