내가 만든 일부 JButton에 actionListener가 배치되었습니다. 사용자가 버튼을 클릭하면 다른 클래스가 호출됩니다.버튼의 기능이 완료되었음을 감지합니다.
Quest.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent iq) {
JButton source = (JButton) iq.getSource();
if (point.equals(points.get(0))){
q1 = new Quest1(); //class called up
source.setEnabled(false);
//This is where my problem lies.... I want to be able to detect when the button's action is finished...than some other action takes place!
}
});
저를 도와주세요 .....
그건 그렇고 ... 추론하지 않고 사람들을 하향보고! –
질문이 실제로 정확하지 않기 때문에 사람이 downvote; 거의 당신이 무엇을 요구하고 있는지 불투명합니다. 이해해주세요 : 입력 품질에 대해 * 모든 * downvote 또는 닫기 요청이 ** 피드백 **으로 표시되어야합니다. – GhostCat
버튼에 등록 된 다른 작업이 있는지 여부를 감지하고 모든 작업이 완료 될 때까지 기다리는 작업입니까? – erickson