Here you can find the source of setZeroMinimumSize(Component component)
public static void setZeroMinimumSize(Component component)
//package com.java2s; /*/*from w w w . j av a 2 s . c om*/ * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. * * This software is open source. * See the bottom of this file for the licence. * * $Id: SwingUtils.java,v 1.1.1.1 2001/05/22 08:13:01 jstrachan Exp $ */ import javax.swing.*; import java.awt.*; import javax.swing.*; public class Main { public static final Dimension ZERO_DIMENSION = new Dimension(0, 0); /** Sets the component to a minimum size of zero to allow split panes * and layout managers from shrinking the components */ public static void setZeroMinimumSize(Component component) { if (component instanceof JComponent) { ((JComponent) component).setMinimumSize(ZERO_DIMENSION); } } }