1 7 8 package com.sun.java.swing.plaf.windows; 9 10 import java.awt.*; 11 import javax.swing.JSplitPane ; 12 import javax.swing.UIManager ; 13 import javax.swing.plaf.basic.BasicSplitPaneUI ; 14 import javax.swing.plaf.basic.BasicSplitPaneDivider ; 15 16 17 30 public class WindowsSplitPaneDivider extends BasicSplitPaneDivider 31 { 32 33 36 public WindowsSplitPaneDivider(BasicSplitPaneUI ui) { 37 super(ui); 38 } 39 40 43 public void paint(Graphics g) { 44 Color bgColor = (splitPane.hasFocus()) ? 45 UIManager.getColor("SplitPane.shadow") : 46 getBackground(); 47 Dimension size = getSize(); 48 49 if(bgColor != null) { 50 g.setColor(bgColor); 51 g.fillRect(0, 0, size.width, size.height); 52 } 53 super.paint(g); 54 } 55 } 56 | Popular Tags |