java课程设计----图书馆管理系统(13)

发布时间:2021-06-05

java课程设计----图书馆管理系统

}

this.addWindowListener(new WindowAdapter(){

});

public void windowClosing(WindowEvent e){ }

actionCode=CLOSE;

//将对话框窗口定位在父窗口的居中位置

public void setSizeAndPosition(int w,int h){ }

public void setTxtEditable(boolean b1,boolean b2,boolean b3){ }

public void actionPerformed(ActionEvent e){ }

public int getActionCode(){ }

public String getSQL(){

String sql="select * from bookInfo where "; if(radID.isSelected())

sql=sql+" bookID like '%"+txtID.getText().trim()+"%'";

sql=sql+" bookName like '%"+txtBookName.getText().trim()+"%'"; sql=sql+" bookPress like '%"+txtBookPress.getText().trim()+"%'"; else if(radBookName.isSelected()) else if(radBookPress.isSelected()) return actionCode; Object s=e.getSource(); if(s==this.radID)

setTxtEditable(true,false,false);

else if(s==this.radBookName) setTxtEditable(false,true,false); else if(s==this.radBookPress) setTxtEditable(false,false,true); else if(s==this.btnOk){ }

else if(s==this.btnCancel){ }

this.actionCode=this.CANCEL; this.setVisible(false); this.actionCode=this.OK; this.setVisible(false); txtID.setEditable(b1); txtBookName.setEditable(b2); txtBookPress.setEditable(b3); this.setSize(w,h); Dimension d=f.getSize(); Point pp=f.getLocation();

this.setLocation(pp.x+(d.width-w)/2,pp.y+(d.height-h)/2);

精彩图片

热门精选

大家正在看