Page 479 - 2
P. 479
contentPane.setBackground(Color.BLACK);
contentPane.add(label);
Pointinfo_panel = new JPanel();
Pointinfo_panel.setOpaque(false);
Pointinfo_panel.setBounds(12, 163, 324, 237);
contentPane.add(Pointinfo_panel);
Discription = new JLabel("");
Discription.setVerticalAlignment(SwingConstants.TOP);
Discription.setFont(new Font(" 굴림", Font.BOLD, 20));
Discription.setForeground(Color.white);
Discription.setBounds(12, 325, 324, 115);
contentPane.add(Discription);
distance_label = new JLabel();
distance_label.setOpaque(false);
distance_label.setForeground(Color.WHITE);
distance_label.setFont(new Font("Dialog", Font.BOLD, 32));
distance_label.setBounds(229, 279, 83, 40);
contentPane.add(distance_label);
new Thread(){
public void run() {
while(Time_textArea.isEnabled())
Time_textArea.setText(getTime());
};
}.start();
}
private String getTime(){
long time = System.currentTimeMillis();
SimpleDateFormat dateFormat = new SimpleDateFormat("hh : mm");
return dateFormat.format(new Date(time));
}
public static void Log(String log){
LogArea.append("\n" + log);
LogArea.setCaretPosition(LogArea.getDocument().getLength());
}
public static void SetWeather(Bluetooth_Data data){
if (data.getW_City()!="") {
City_name.setText(data.getW_City());
Temp_value.setText(data.getW_Tmp());
}
ImageIcon image=null;
if(data.getW_wf().trim().equals(" 맑음")){
image = new ImageIcon(HUD.class.getResource("/NB01.png"));
}else if(data.getW_wf().trim().equals(" 구름 조금")){
- 479 -