java火灾报警系统,求救帮我完善下,输入地址后,地图上位置可以闪烁,单击地图位置可以显示联系人,电话,、谢谢,急急急急急!!
import java.awt.*;import java.awt.event.*;
import javax.swing.*;
public class Jiemian{
public static void main(String args[]){
new Windows();
}
}
class Windows extends JFrame implements MouseListener{
JButton button;
JTextArea textArea;
Box baseBox,boxV1,boxV2,box;
JButton controlButton1,controlButton2,controlButton3;
Windows(){
controlButton1=new JButton("确定");
controlButton2=new JButton("取消");
boxV1=Box.createVerticalBox();
boxV1.add(new JLabel("输入报警单位"));
boxV2=Box.createVerticalBox();
boxV2.add(new JTextField(16));
boxV2.add(Box.createVerticalStrut(8));
baseBox=Box.createHorizontalBox();
baseBox.add(boxV1);
baseBox.add(Box.createHorizontalStrut(10));
baseBox.add(boxV2);
baseBox.add(controlButton1);
baseBox.add(controlButton2);
setLayout(new FlowLayout());
add(baseBox);
setLayout(new FlowLayout());
addMouseListener(this);
controlButton1.addMouseListener(this);
textArea=new JTextArea(3,18);
add(controlButton1);
add(new JScrollPane(textArea));
ImageIcon icon=new ImageIcon("ditu.jpg");
JLabel l=new JLabel(icon,JLabel.RIGHT);
setBounds(5,5,1200,1280);
getContentPane().add(l);
setTitle("火灾报警管理系统");
setVisible(true);
validate();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void keyPressed(KeyEvent e){
TextField t=(TextField)e.getSource();
if(t.getCaretPosition()>=6)
t.transferFocus();
}
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e){}
public void focusGained(FocusEvent e){
TextField text=(TextField)e.getSource();
text.setText(null);
}
public void focusLost(FocusEvent e){}
@Override
public void mouseClicked(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseReleased(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
@Override
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
}
java 管理 windows --------------------编程问答-------------------- lz。。。。 --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 这都是怎么了、、 --------------------编程问答-------------------- 这么高级的东东 --------------------编程问答--------------------
补充:Java , Java相关