Menu:

14-Mar-2008 Latest component update.

HeaderPanel

component iconJHeaderPanel is a header panel with a title, message text and context icon. A reflection effect can be painted below the context icon. The header can be used with or without a title text. JHeaderPanel class extends the Swing JPanel component.

default colors
An example of a header panel

Creation

public JHeaderPanel()
public JHeaderPanel(int popDuration)

The default constructor creates an empty header panel, while the second constructor allows you to specify the message pop duration.

Methods

public String getDefaultMessage()
public void setDefaultMessage(String defaultMessage)

public boolean isReflectionPainted()
public void setReflectionPainted(boolean reflectionPainted)

public boolean isTitleVisible()
public void setTitleVisible(boolean titleVisible)
public void setTitleFont(Font font)
public void setTitle(String title)

public void setContextIcon(ImageIcon icon)
public void clearContextIcon()

public void setMessage(String text)
public String getMessage()
public void clearMessage()
public void popMessage(String text)
public void setMessageIcon(ImageIcon icon)
public void clearMessageIcon()

Use the setMessage() or setDefaultMessage() methods to specify the message text. The popMessage() method displays a message for a pop duration (default is 3 seconds). When a pop message disappears the default message is displayed.

The setTitleVisible() method allows you to display/hide the title. The setReflectionPainted() method allows you to control whether a fading reflection is painted below the context icon.