Page 476 - 2
P. 476
Bluetooth_Data data = (Bluetooth_Data) oin.readObject();
if(data.getMessage() != null){
HUD.Log(" 전달받은 데이터 : " + data.getMessage());
if(data.getMessage().trim().contains(" 메시지")){
System.out.println(" 메시지받음");
HUD.setSMSReceived();
}
}
if(data.getW_wf() != null){
HUD.SetWeather(data);
}
if(data.getGPS_speed() != null){
HUD.SetGPSSpeed(data);
}
if(data.getCurrent_Point() != null){
HUD.SetPoinInfo(data);
}
}
} catch (Exception e) {
try {
in.close();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
}
<HUD>
package com.example.dbstp.mdp_2;
//import 생략
public class HUD extends JFrame {
private JPanel contentPane;
private static JTextArea LogArea;
private static JTextArea Time_textArea;
private JScrollPane scrollPane;
private static JPanel Weather_panel;
private static JTextArea Temp_value;
private static JTextArea City_name;
private static JPanel Image_panel;
private static JTextArea Text_Speed;
private static JPanel Pointinfo_panel;
private static ImageIcon Dir_Icon = new ImageIcon(HUD.class.getResource(""));
private static JLabel Discription;
private static JLabel distance_label;
private JLabel label;
- 476 -