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

📄 searchnum.java

📁 A easy phone book. With the book,you can manage you personal masagge.
💻 JAVA
字号:
import javax.swing.*;
import java.awt.event.*;

public class SearchNum implements ActionListener{
	public void actionPerformed(ActionEvent e){
		if(e.getActionCommand().equals("查找")||e.getActionCommand().equals("查找记录"))
		    new SearchDialog();
	}
}

class SearchDialog{
	static String str,sqlstr;
	static JFrame frm;
	public SearchDialog(){
		frm=phonenum.getFrame();
		str=JOptionPane.showInputDialog(frm,"请输入要查找的人:");
		sqlstr="select * from phonenum where name='"+str+"'";
		if((str!=null)&&(str!="")&&(getObject.isFound(sqlstr)==true)){
		}
		else if((str==null)||(str==""))
		    {sqlstr="select * from phonenum";
		    }
		else{
			JOptionPane.showMessageDialog(frm,"对不起,没有找到");
			sqlstr="select * from phonenum";
		    }
		getObject.setSql(sqlstr);
		Update.furbish();
	}
}

⌨️ 快捷键说明

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