即使指定了要启用的按钮,它也会一直被禁用
我尝试将启用代码放置在不同的区域,但是没有任何效果。
btn_Receipt.setEnabled(true);
btn_Reset.setEnabled(true);
txtA_ProofOfPurchase.setEnabled(true);
double deposit = Double.parseDouble(JOptionPane.showInputDialog("Please specify the amount of money that you would like to withdraw (in Rands)"));
String name = "Nia Sanderson";
String action ="Deposit";
txtA_ProofOfPurchase.setText
("******************************* \nNedbank Online Banking " +
"\nCustomers Name: " + name +
"\nAction: " + action +
"\nDeposit Amount: R " + deposit +
"\n*******************************"
);
我希望输出结果会启用两个按钮和文本区域