View Javadoc
1   /*
2    * Created on 2005-maj-19
3    */
4   package test;
5   
6   import javax.swing.JPanel;
7   
8   import java.awt.BorderLayout;
9   import javax.swing.JLabel;
10  /***
11   * @author redsolo
12   */
13  public class ImagePanel extends JPanel
14  {
15  
16  	private JLabel imageLabel = null;
17  	/***
18  	 * This is the default constructor
19  	 */
20  	public ImagePanel() {
21  		super();
22  		initialize();
23  	}
24  	/***
25  	 * This method initializes this
26  	 * 
27  	 * @return void
28  	 */
29  	private  void initialize() {
30  		imageLabel = new JLabel();
31  		this.setLayout(new BorderLayout());
32  		this.setSize(300,200);
33  		imageLabel.setText("JLabel");
34  		imageLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
35  		imageLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
36  		this.add(imageLabel, java.awt.BorderLayout.SOUTH);
37  	}
38  }