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

发布时间:2021-06-05

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

}

LayoutUtil.add(ap,GridBagConstraints.NONE,

GridBagConstraints.CENTER,0,0,0,0,1,1,this.btnPre); GridBagConstraints.CENTER,0,0,1,0,1,1,this.btnNext); GridBagConstraints.CENTER,100,0,2,0,1,1,new JLabel()); GridBagConstraints.CENTER,0,0,3,0,1,1,this.btnOk); GridBagConstraints.CENTER,0,0,4,0,1,1,this.btnCancel);

LayoutUtil.add(ap,GridBagConstraints.NONE, LayoutUtil.add(ap,GridBagConstraints.HORIZONTAL, LayoutUtil.add(ap,GridBagConstraints.NONE, LayoutUtil.add(ap,GridBagConstraints.NONE,

getContentPane().add(p,BorderLayout.CENTER);

getContentPane().add(ap,BorderLayout.SOUTH); //将对话框窗口定位在父窗口的居中位置 setSizeAndPosition(550,120);

});

this.addWindowListener(new WindowAdapter(){

public void windowClosing(WindowEvent e){ }

actionCode=CLOSE;

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

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

public void actionPerformed(ActionEvent e){ } }

public String getBookName(){ }

return txtBookName.getText().trim();

Object s=e.getSource(); if(s==this.btnCancel) }

else if(s==this.btnOk) okClicked();

{

this.actionCode=this.CANCEL; this.setVisible(false); 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);

public String getID(){

return txtID.getText().trim();

//将图书单价由字符串类型转化为Double类型

//如果不是合法的数值字符串,取值Double.NEGATIVE_INFINITY

精彩图片

热门精选

大家正在看