Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Java Platform SE 6
    Find the link for the class in the lower left, click on it and the doc shows in the main frame.
  2. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Look at the API doc for the Timer in the swing package. It has a small example of how to use it.
  3. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Look at using the Timer class. It will can your method every time period(2 seconds). In your method you can update the balance field.
  4. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    The error message says that the String being parsed was empty.
    You could test for an empty String before trying to parse it and ask the user to enter a value then exit the method to wait for the...
  5. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    My code was an example. You need to read the API doc for the Integer class to find the spelling for the method.
    I think it starts with parse....
  6. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Something like this. Check the API doc for the correct spelling of the method names:

    String val = textField.getTheDataMethod(); // Get contents of the text field
    int intVal =...
  7. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    The text fields have methods for getting the values they contain as Strings. You can then convert the Strings into the type of values you want and save those values in class variables that can be...
  8. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Use the time System.currentTimeMillis() to detect when 24 seconds have passed. Get starting time and then compare current time against that.
  9. Replies
    22
    Views
    2,352

    Re: Threads in BankAccount program

    Try debugging the code to see what it is doing. The way I do it is by adding println statements that print out all the values of the variables that the program uses. If you know what the program is...
Results 1 to 9 of 9