// Sample use of Label import javax.awt.Color; import javax.awt.Font; import javax.awt.Label; // ... Label label = new Label( "hello", Label.RIGHT ); label.setBackground( Color.BLACK ); label.setForeground( Color.YELLOW ); label.setFont( new Font ( "Dialog", 15, Font.PLAIN )); label.setText( "different text" ); // note the American spelling of center label.setAlignment( Label.CENTER );