1 /* 2 * 01/09/2002 - 20:43:57 3 * 4 * DefaultHeader.java - 5 * Copyright (C) 2002 Csaba Kert�sz 6 * kcsaba@jdictionary.info 7 * www.jdictionary.info 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public License 11 * as published by the Free Software Foundation; either version 2 12 * of the License, or (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 */ 23 24 25 package info.jdictionary.modules; 26 27 import info.jdictionary.DefaultFrameAssembler; 28 import info.jdictionary.ImageBank; 29 import java.awt.Color; 30 import java.awt.BorderLayout; 31 import java.awt.Dimension; 32 import javax.swing.JPanel; 33 import javax.swing.JLabel; 34 35 public class DefaultHeader extends JPanel { 36 37 JLabel jLabel1 = new JLabel(); 38 JLabel jLabel2 = new JLabel(); 39 DefaultFrameAssembler assembler; 40 DefaultHeader(DefaultFrameAssembler assembler)41 public DefaultHeader(DefaultFrameAssembler assembler) { 42 super(); 43 this.assembler = assembler; 44 45 setBackground(Color.black); 46 setAlignmentX((float) 0.0); 47 setAlignmentY((float) 0.0); 48 setMaximumSize(new Dimension(2048, 60)); 49 setLayout(new BorderLayout()); 50 jLabel1.setIcon(ImageBank.getImageByName("MainHeaderLeftSide.png")); 51 jLabel2.setIcon(ImageBank.getImageByName("MainHeaderRightSide.png")); 52 add(jLabel1, BorderLayout.WEST); 53 add(jLabel2, BorderLayout.EAST); 54 } 55 }