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

📄 dialogsetcall.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 DialogSetCall extends JDialog {  private JButton jButtonOK = new JButton();  JLabel jLabel1 = new JLabel();  JTextField jTextInterval = new JTextField();  JTextField jTextCallNum = new JTextField();  JLabel jLabel2 = new JLabel();  private Panel panel2 = new Panel();  JLabel jLabel3 = new JLabel();  GridBagLayout gridBagLayout1 = new GridBagLayout();  GridBagLayout gridBagLayout2 = new GridBagLayout();  public String Interval;  public String CallNum;  public String CallMode;  public DialogSetCall(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public DialogSetCall() {    this(null, "", false);  }  private void jbInit() throws Exception {    jLabel1.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel1.setAlignmentX((float) 0.0);    jLabel1.setAlignmentY((float) 0.5);    jLabel1.setText("呼叫间隔(秒):");    jTextInterval.setText("1");    jTextCallNum.setText("1");    jLabel2.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel2.setText("呼叫次数:");    this.getContentPane().setBackground(Color.lightGray);    this.setEnabled(true);    this.setTitle("呼叫设置");    this.getContentPane().setLayout(gridBagLayout1);    panel2.setLayout(gridBagLayout2);    panel2.setBackground(Color.lightGray);    jButtonOK.addActionListener(new DialogSetCall_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.setFont(new java.awt.Font("Dialog", 0, 12));    jButtonOK.setMnemonic('0');    jLabel3.setFont(new java.awt.Font("Dialog", 0, 14));    jLabel3.setForeground(Color.blue);    jLabel3.setText("    呼叫车辆设置");    panel2.add(jTextCallNum,   new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(38, 14, 0, 0), 51, 5));    panel2.add(jLabel1,   new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(40, 22, 0, 0), 15, 9));    panel2.add(jTextInterval,   new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(38, 0, 0, 58), 54, 5));    panel2.add(jLabel2,   new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(39, 26, 0, 0), 24, 10));    panel2.add(jButtonOK,   new GridBagConstraints(1, 3, 2, 1, 0.0, 0.0            ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(36, 52, 57, 32), 29, 0));    panel2.add(jLabel3,   new GridBagConstraints(1, 0, 3, 1, 0.0, 0.0            ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(31, 39, 0, 116), 46, 16));    this.getContentPane().add(panel2,  new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0            ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(1, 0, 0, 1), 58, 58));    jButtonOK.setActionCommand("jButtonOK");    jButtonOK.setText("确  定");  }  void jButtonOK_actionPerformed(ActionEvent e) {    Interval=jTextInterval.getText();    CallNum=jTextCallNum.getText();    CallMode="一次定位";    dispose();  }}class DialogSetCall_jButtonOK_actionAdapter implements java.awt.event.ActionListener {  DialogSetCall adaptee;  DialogSetCall_jButtonOK_actionAdapter(DialogSetCall adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButtonOK_actionPerformed(e);  }}

⌨️ 快捷键说明

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