1 19 20 package org.apache.excalibur.instrument.client; 21 22 import java.awt.BorderLayout ; 23 24 import javax.swing.JLabel ; 25 import javax.swing.JPanel ; 26 27 35 class StatusBar extends JPanel 36 { 37 private JLabel m_statusLabel; 38 39 42 StatusBar() 43 { 44 setLayout( new BorderLayout () ); 45 m_statusLabel = new JLabel ( " " ); 46 add( m_statusLabel, BorderLayout.CENTER ); 47 } 48 49 52 void setStatusMessage( String message ) 53 { 54 if ( ( message == null ) || ( message.length() < 1 ) ) 56 { 57 message = " "; 58 } 59 60 if ( !message.equals( m_statusLabel.getText() ) ) 61 { 62 m_statusLabel.setText( message ); 63 m_statusLabel.invalidate(); 64 validate(); 65 } 66 } 67 } 68 | Popular Tags |