⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogstopcar.java

📁 实现网络GPS定位车辆的位置
💻 JAVA
字号:
package MapperClientApplet;import java.awt.*;import javax.swing.*;import java.awt.event.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author unascribed * @version 1.0 */ public class DialogStopCar extends JDialog {  private JButton jButtonOK = new JButton();  JLabel jLabel1 = new JLabel();  JTextField jTextConfirm = new JTextField();  private Panel panel2 = new Panel();  JLabel jLabel2 = new JLabel();  JLabel jLabel3 = new JLabel();  GridBagLayout gridBagLayout1 = new GridBagLayout();  JButton jButton1 = new JButton();  GridBagLayout gridBagLayout2 = new GridBagLayout();  public DialogStopCar(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public DialogStopCar() {    this(null, "", false);  }  private void jbInit() throws Exception {    jLabel1.setFont(new java.awt.Font("DialogInput", 0, 12));    jLabel1.setAlignmentX((float) 0.0);    jLabel1.setAlignmentY((float) 0.5);    jLabel1.setVerifyInputWhenFocusTarget(true);    jLabel1.setText("请输入确认码:");    jLabel1.setVerticalAlignment(SwingConstants.CENTER);    jLabel1.setVerticalTextPosition(SwingConstants.CENTER);   // jTextConfirm.addActionListener(new DialogStopCar_jTextConfirm_actionAdapter(this));    this.getContentPane().setBackground(Color.lightGray);    this.setEnabled(true);    this.setTitle("车辆熄火");    this.getContentPane().setLayout(gridBagLayout1);    panel2.setLayout(gridBagLayout2);    panel2.setBackground(Color.lightGray);    //jButtonOK.addActionListener(new DialogStopCar_jTextConfirm_actionAdapter(this));    jButtonOK.addActionListener( new DialogStopCar_jButtonOK_actionAdapter(this));    //panel2.add(jCheckGPRS,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0    //        ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(28, 25, 24, 0), 0, 0));    //jButtonOK.addActionListener(new DialogStopCar_jTextConfirm_actionAdapter(this));    //jButtonOK.addActionListener(new DialogStopCar_jTextConfirm_actionAdapter(this));    jButtonOK.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel2.setFont(new java.awt.Font("Dialog", 0, 16));    jLabel2.setForeground(Color.blue);    jLabel2.setText(" 车辆熄火");    jLabel2.setVerticalAlignment(SwingConstants.CENTER);    jLabel2.setVerticalTextPosition(SwingConstants.CENTER);    jTextConfirm.setFont(new java.awt.Font("Dialog", 0, 12));    jTextConfirm.setText("");    jLabel3.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel3.setHorizontalAlignment(SwingConstants.CENTER);    jLabel3.setText("熄火前请确保该车处于安全位置,以造成不必要的损失!");    jButton1.setFont(new java.awt.Font("Dialog", 0, 12));    jButton1.setText("退  出");    jButton1.addActionListener(new DialogStopCar_jButton1_actionAdapter(this));    panel2.add(jTextConfirm,  new GridBagConstraints(0, 2, 2, 1, 1.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(24, 178, 0, 125), 167, 0));    panel2.add(jLabel1,  new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(22, 76, 0, 9), 36, 8));    panel2.add(jLabel3,  new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 87, 0, 73), 25, 5));    panel2.add(jLabel2,  new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(39, 158, 0, 161), 57, 13));    panel2.add(jButton1,  new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(46, 63, 70, 132), 11, -3));    panel2.add(jButtonOK,  new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(46, 129, 70, 0), 11, -3));    this.getContentPane().add(panel2,  new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 75, 76));    jButtonOK.setActionCommand("jButtonOK");    jButtonOK.setText("确  定");  }  void jButtonOK_actionPerformed(ActionEvent e) {   dispose();  }  void jTextConfirm_actionPerformed(ActionEvent e) {  }  void jButton1_actionPerformed(ActionEvent e) {  dispose();  }} class DialogStopCar_jButtonOK_actionAdapter implements java.awt.event.ActionListener {  DialogStopCar adaptee;  DialogStopCar_jButtonOK_actionAdapter(DialogStopCar adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButtonOK_actionPerformed(e);  }}/*class DialogStopCar_jTextConfirm_actionAdapter implements java.awt.event.ActionListener {  DialogStopCar adaptee;  DialogStopCar_jTextConfirm_actionAdapter(DialogStopCar adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButtonOK_actionPerformed(e);  }}*/class DialogStopCar_jButton1_actionAdapter implements java.awt.event.ActionListener {  DialogStopCar adaptee;  DialogStopCar_jButton1_actionAdapter(DialogStopCar adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -