📄 testzscomboedit.java
字号:
package wisesoft;
import javax.swing.*;
import java.awt.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;
import com.borland.dbswing.*;
import support.*;
import java.lang.*;
import javax.swing.border.*;
import java.util.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class testZsComboEdit extends JFrame {
ImageIcon m_imageSelect;
TitledBorder titledBorder1;
TitledBorder titledBorder2;
JPanel jPanel1 = new JPanel();
XYLayout xYLayout2 = new XYLayout();
BorderLayout borderLayout1 = new BorderLayout();
ZSLongLatEdit jPanel2 = new ZSLongLatEdit();
ZSLongLatEdit jPanel3 = new ZSLongLatEdit();
JButton jButton2 = new JButton();
JButton jButton1 = new JButton();
public testZsComboEdit() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args)
{
testZsComboEdit frm_testCombo = new testZsComboEdit();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frm_testCombo.getPreferredSize();
if (frameSize.height > screenSize.height)
{
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width)
{
frameSize.width = screenSize.width;
}
frm_testCombo.setSize(frameSize);
frm_testCombo.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
frm_testCombo.setVisible(true);
}
private void jbInit() throws Exception {
titledBorder1 = new TitledBorder("");
titledBorder2 = new TitledBorder("");
this.getContentPane().setLayout(borderLayout1);
// jButton2.addActionListener(new testCom_jButton2_actionAdapter(this));
//jButton1.addActionListener(new testCom_jButton1_actionAdapter(this));
jPanel1.setLayout(xYLayout2);
jButton2.setText("设置经度");
jButton2.addActionListener(new testCom_jButton2_actionAdapter(this));
jButton1.setText("读经度");
jButton1.addActionListener(new testCom_jButton1_actionAdapter(this));
jButton1.setSelectedIcon(null);
jButton1.setText("读经纬度");
jButton1.addActionListener(new testCom_jButton1_actionAdapter(this));
jButton2.setActionCommand("设经纬度");
jButton2.setText("取经纬度");
jButton2.addActionListener(new testCom_jButton2_actionAdapter(this));
jPanel1.setPreferredSize(new Dimension(406, 400)); jPanel1.add(jPanel2, new XYConstraints(27, 13, 267, 111));
jPanel1.add(jPanel3, new XYConstraints(29, 131, 267, 114));
jPanel1.add(jButton1, new XYConstraints(51, 257, 95, -1));
jPanel1.add(jButton2, new XYConstraints(163, 258, 108, -1));
this.getContentPane().add(jPanel1, BorderLayout.CENTER);
jPanel2.setLongStr("E021010100");
jPanel2.setLatStr("N021212140");
jPanel3.setLongStr("E121010100");
jPanel3.setLatStr("N021212140");
}
void ZsComboTest_mouseClicked(MouseEvent e) {
}
void ZsComboTest_mouseEntered(MouseEvent e) {
}
void this_mouseMoved(MouseEvent e) {
}
void jButton1_actionPerformed(ActionEvent e) {
ZSCom_Func.Showmessage( jPanel2.getLongStr(),"");
ZSCom_Func.Showmessage( jPanel2.getLatStr(),"");
}
void jButton2_actionPerformed(ActionEvent e) {
jPanel2.setLongStr("E121010100");
jPanel2.setLatStr("N321212140");
jPanel3.setLongStr("E101010100");
jPanel3.setLatStr("N421212140");
}
}
class testCom_jButton1_actionAdapter implements java.awt.event.ActionListener {
testZsComboEdit adaptee;
testCom_jButton1_actionAdapter(testZsComboEdit adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class testCom_jButton2_actionAdapter implements java.awt.event.ActionListener {
testZsComboEdit adaptee;
testCom_jButton2_actionAdapter(testZsComboEdit adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -