Page 47 - 3-2
P. 47
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class MDP_Project3 extends JFrame {
private JPanel contentPane;
ImageIcon EM_IM;
ImageIcon NFC_IM;
JLabel emart_logo;
JLabel nfc_image;
private JLabel lblNfc;
final GpioController gpio = GpioFactory.getInstance();
finalGpioPinDigitalInputButton2=this.gpio.provisionDigitalInputPin(RaspiPin.GPIO_21,
PinPullResistance.PULL_DOWN);
public MDP_Project3() {
MDP_Project4 mdp_Project4=new MDP_Project4();
setBackground(Color.LIGHT_GRAY);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 800, 450);
this.contentPane = new JPanel();
this.contentPane.setBackground(Color.WHITE);
this.contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
this.contentPane.setLayout(null);
this.EM_IM = new ImageIcon("/home/pi/emart-logo.png", "EM_IM");
this.emart_logo = new JLabel();
this.emart_logo.setIcon(EM_IM);
this.emart_logo.setBounds(668,12,100,28);
this.contentPane.add(emart_logo);
NFC_IM = new ImageIcon("/home/pi/nfc_image.jpg", "NFC_IM");
nfc_image = new JLabel();
nfc_image.setIcon(NFC_IM);
nfc_image.setBounds(241,31,308,306);
contentPane.add(nfc_image);
lblNfc=newJLabel("\uACB0\uC81C\uB97C\uC704\uD574 \uD578\uB4DC\uD3F0\uC744
- 47 -