Class FixedPreferredWidthPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class FixedPreferredWidthPanel extends JPanel
A JPanel with a fixed preferred width.

Content might be not displayed correctly if too large.

See Also:
  • Constructor Details

    • FixedPreferredWidthPanel

      public FixedPreferredWidthPanel()
      Create a panel with preferred width = 100 pixels.
    • FixedPreferredWidthPanel

      public FixedPreferredWidthPanel(int prefWidth)
  • Method Details

    • getFixedPreferredWidth

      public int getFixedPreferredWidth()
      Returns:
      The fixed preferred width
    • setFixedPreferredWidth

      public final void setFixedPreferredWidth(int prefWidth)
      Parameters:
      prefWidth - The fixed preferred width to set
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent