예제 #1
0
 private void doOneImage(String imageName) {
   Image bannerImage = DefaultSettings.getImage(imageName);
   ImageIcon imageIcon = new ImageIcon(bannerImage);
   this.setLayout(new FlowLayout(FlowLayout.LEADING));
   JLabel label = new JLabel(imageIcon);
   this.add(label);
 }
예제 #2
0
  private void doThreeImages(String imageNameL, String imageNameM, String imageNameR) {
    this.setLayout(new BorderLayout());

    Image bannerImageL = DefaultSettings.getImage(imageNameL);
    ImageIcon imageIconL = new ImageIcon(bannerImageL);
    JLabel labelL = new JLabel(imageIconL);
    this.add(labelL, BorderLayout.WEST);

    Image bannerImageM = DefaultSettings.getImage(imageNameM);
    ImageIcon imageIconM = new ImageIcon(bannerImageM);
    JLabel labelM = new JLabel(imageIconM);
    this.add(labelM, BorderLayout.CENTER);

    Image bannerImageR = DefaultSettings.getImage(imageNameR);
    ImageIcon imageIconR = new ImageIcon(bannerImageR);
    JLabel labelR = new JLabel(imageIconR);
    this.add(labelR, BorderLayout.EAST);
  }