View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5    */
6   package net.kwfgrid.gwui.gui;
7   
8   import java.awt.Dimension;
9   import javax.swing.JPanel;
10  
11  /***
12     A JPanel which only stretches in horizontal dimension.
13   */
14  public class XStretchPanel extends JPanel {
15      public Dimension getMaximumSize() {
16  	Dimension ps = super.getPreferredSize();
17  	Dimension ms = super.getMaximumSize();
18  	ms.height = ps.height;
19  	return ms;
20      }
21  }