1 19 20 package taskblocks.app; 21 22 import java.awt.Dimension ; 23 24 import javax.swing.JSeparator ; 25 26 public class FixedSeparator extends JSeparator { 27 28 public FixedSeparator(int direction) { 29 super(direction); 30 } 31 32 public Dimension getMaximumSize() { 33 Dimension s = super.getMaximumSize(); 34 if(getOrientation() == HORIZONTAL) { 35 s.height = getPreferredSize().height; 36 } else { 37 s.width = getPreferredSize().width; 38 s.height = 40; 39 } 40 return s; 41 } 42 } 43 | Popular Tags |