ToXSiK 0 Newbie Poster
private void depositButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              
        AdminLoginPage adminLogIn = new AdminLoginPage(users.get(accountNumber).userName, "deposit", users.get(accountNumber).balance, Double.parseDouble(depositAmountTextField.getText()), users);
        adminLogIn.setVisible(true);
        customUserDetails1.setText("Welcome " + currentUserName + "! You Have $" + (adminLogIn.getBalance()) + " Available.");
        depositAmountTextField.setText(null);
}

AdminLoginPage is a JFrame Constructor Class that displays a certain users account information and asks for an administrator to login to verify a deposit/withdrawal to their account.

The problem is, there seems to be no "wait" command that I can use that will wait for the administrator to login.

See, what happens is, adminLogIn will EVENTUALLY change the balance of the persons account and save it to a text file, but there is a wait because the administrator must sign in.

Is there something I can add in between here:

adminLogIn.setVisible(true);
        customUserDetails1.setText("Welcome " + currentUserName + "! You Have $" + ([B][I][U]adminLogIn.getBalance()[/U][/I][/B]) + " Available.");

?

Because, getBalance returns their current balance before any changes were done and it is not reflected on the account page.

If you need more code, please let me know, ANY information will be helpful.

Cheers.

Toxsik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.