📄 radiobuttonaction.java
字号:
package librarymanagement.action.dialogAction;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import librarymanagement.view.dialog.ReturnBookDialog;
public class RadioButtonAction implements ActionListener {
private ReturnBookDialog returnBook;
public RadioButtonAction(ReturnBookDialog returnBook){
this.returnBook = returnBook;
}
public void actionPerformed(ActionEvent e) {
String name = e.getActionCommand();
if(name.equals("图书编号:")){
returnBook.getTextBookID().setEditable(true);
returnBook.getTextStudentID().setEditable(false);
returnBook.getTextStudentID().setText("");
}
if(name.equals("借书证号:")){
returnBook.getTextStudentID().setEditable(true);
returnBook.getTextBookID().setEditable(false);
returnBook.getTextBookID().setText("");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -