java课程设计----图书馆管理系统
}
}
}
public String getBookPress(){ }
public int getActionCode(){ }
public void okClicked() { }
//图书编号不为空,且价格为数值类型时 隐藏对话框 if(!this.txtID.getText().trim().equals("")){ } else
JOptionPane.showMessageDialog(f,"请设定图书编号!","提示",
RMATION_MESSAGE);
try{
Double.parseDouble(this.txtBookPrice.getText().trim()); }catch(Exception e){ }
this.actionCode=this.OK; this.setVisible(false);
JOptionPane.showMessageDialog(f,"价格非法!","提示",
RMATION_MESSAGE);
return this.actionCode;
return txtBookPress.getText().trim(); double result=Double.NEGATIVE_INFINITY; try{ }
return new Double(result);
result=Double.parseDouble(this.txtBookPrice.getText().trim()); result=Double.NEGATIVE_INFINITY; }catch(Exception e){
return ;
class SearchDialog extends JDialog implements ActionListener{
final int OK=1;
final int CANCEL=-1; final int CLOSE=0;
private int actionCode=CANCEL;
private JRadioButton radID=new JRadioButton(" 图书编号 "); private JTextField txtID=new JTextField();
private JRadioButton radBookName=new JRadioButton(" 图书名称 ");