import javax.swing.*;
import java.awt.*;
public class Raison extends JPanel {
public static void main(String[] args){
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("RAISON 담배");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new Raison());
frame.setSize(230, 370);
frame.setLocation(500, 200);
frame.setVisible(true);
frame.setResizable(false);
}
public Raison(){
setLayout(null);
setBackground(Color.white);
JPanel t_line = new JPanel();
t_line.setBorder(BorderFactory.createLineBorder(new Color(230, 230, 230)));
t_line.setBounds(5, 100, 210, 1);
add(t_line);
JLabel title = new JLabel("RAISON");
title.setFont(new Font("Arial Black", Font.BOLD, 17));
title.setForeground(new Color(3, 87, 74));
title.setBounds(10, 78, 90, 15);
add(title);
JLabel timg = new JLabel();
Icon img1 = new ImageIcon("c:\\timg.jpg");
timg.setIcon(img1);
timg.setBounds(105, 0, 10, 100);
add(timg);
JLabel clabel1 = new JLabel("GREEN CAT");
clabel1.setFont(new Font("Arial", Font.BOLD, 11));
clabel1.setForeground(new Color(26, 177, 144));
clabel1.setBounds(55, 200, 95, 15);
add(clabel1);
JLabel clabel2 = new JLabel("CREATIVE REVOLUTION");
clabel2.setFont(new Font("Arial", Font.BOLD, 9));
clabel2.setForeground(new Color(97, 153, 142));
clabel2.setBounds(55, 215, 110, 8);
add(clabel2);
JLabel cimg = new JLabel();
Icon img2 = new ImageIcon("c:\\cat.jpg");
cimg.setIcon(img2);
cimg.setBounds(127, 127, 80, 80);
add(cimg);
JLabel box1 = new JLabel();
box1.setBorder(BorderFactory.createLineBorder(new Color(126, 135, 140)));
box1.setBounds(5, 235, 210, 95);
add(box1);
JLabel wa1 = new JLabel("경고 : 건강에 해로운 담배. 일단 흡연");
wa1.setBounds(20, 248, 200, 17);
wa1.setFont(new Font("돋움", Font.PLAIN, 11));
wa1.setForeground(new Color(126, 135, 140));
add(wa1);
JLabel wa2 = new JLabel("하게 되면 끊기가 매우 어렵습니다.");
wa2.setBounds(20, 261, 200, 17);
wa2.setFont(new Font("돋움", Font.PLAIN, 11));
wa2.setForeground(new Color(126, 135, 140));
add(wa2);
JLabel wa3 = new JLabel("담배 연기에는 발암성 물질인 나프");
wa3.setBounds(20, 279, 200, 17);
wa3.setFont(new Font("돋움", Font.PLAIN, 11));
wa3.setForeground(new Color(126, 135, 140));
add(wa3);
JLabel wa4 = new JLabel("틸아민, 티켈, 벤젠, 비닐 크롤라이드,");
wa4.setBounds(20, 292, 200, 17);
wa4.setFont(new Font("돋움", Font.PLAIN, 11));
wa4.setForeground(new Color(126, 135, 140));
add(wa4);
JLabel wa5 = new JLabel("비소, 카드뮴이 들어 있습니다.");
wa5.setBounds(20, 305, 200, 17);
wa5.setFont(new Font("돋움", Font.PLAIN, 11));
wa5.setForeground(new Color(126, 135, 140));
add(wa5);
}
} |