Search:

Type: Posts; User: Ancharius

Page 1 of 2 1 2

Search: Search took 0.24 seconds.

  1. [SOLVED] Re: Getting a calculate button to work, and clear button to reset everything.

    Any help would be appreciated.
    What I have tried is adding action listeners for the jradiobutton and checkboxes but I wasn't sure where to place them.

    import java.awt.event.ActionEvent;
    import...
  2. [SOLVED] Getting a calculate button to work, and clear button to reset everything.

    I'm creating a Pizza Ordering GUI, and I am confused on how & where to add an Action Listener for the calculate button to recognize the jradio button
    and jcheckboxes. Can anyone help me?...
  3. Replies
    10
    Views
    409

    [SOLVED] Re: Catch without a try error

    Thanks guys I fixed it in class today. I had to set my double monthlypay1=0; and that made it work. As for the hiding my variable's I'll fix that up so my variables aren't hiding. But thanks for...
  4. Replies
    10
    Views
    409

    [SOLVED] Re: Catch without a try error

    The one at the bottom.


    while (monthlypay1 < 0) {
    System.out.print("You need to enter positive numerical data!");
    break;


    }
    ...
  5. Replies
    10
    Views
    409

    [SOLVED] Re: Catch without a try error

    Ok i fixed the error's of catch without a try and vice versa. But now its telling me that my variable "monthlypay1" is not initialized which I don't understand how it isn't. Otherwise the code...
  6. Replies
    10
    Views
    409

    [SOLVED] Re: Catch without a try error

    Thanks alot guys. I will look at the tutorial. And My java teacher told me to put everything within the try block to make it more simple. Because it will try through everything and catch any error at...
  7. Replies
    10
    Views
    409

    [SOLVED] Catch without a try error

    I'm doing a project where I have to catch a user inputting a string into one of the prompt.
    Problem is it seems I always get catch without a try error no matter what I do.
    it keeps saying expected...
  8. Replies
    9
    Views
    547

    Re: If Else loop or do while loop

    Thanks a lot!
  9. Replies
    9
    Views
    547

    Re: If Else loop or do while loop

    package monthypayment2;
    import java.text.NumberFormat;
    import java.util.Scanner;


    public class Monthypayment2 {
    private static double monthlypay1;
    private static...
  10. Replies
    2
    Views
    237

    Re: While loop, help with looping.

    Sorry. No one in the thread answered my question so I thought I could post a new one. So I suppose a moderator can close this thread.
  11. Replies
    6
    Views
    218

    [SOLVED] Re: GAME VIEW - flashing

    Well first off fix your sentence... I cannot understand the grammar.. Or it might just be because English is not my main language.
    Secondly, post the things you have tried to do in your code to fix...
  12. Replies
    2
    Views
    237

    While loop, help with looping.

    I need help looping my program that I am doing. First off what I am trying to do is prompt the user if they would like to calculate again. If they type in the string "y" then It will loop them back...
  13. Replies
    9
    Views
    547

    Re: If Else loop or do while loop

    I put the statements in the incorrect place and tried this.


    if (monthlypay1 >= 0) {
    System.out.print("The Monthly Payment is: $ " + monthlypay1);
    System.out.print("Would you...
  14. Replies
    9
    Views
    547

    Re: If Else loop or do while loop

    Any help?

    --- Update ---

    Guys please. I really need help on this. What I've tried is this.


    int repeat = 0;
    int error = 0;
  15. Replies
    9
    Views
    547

    If Else loop or do while loop

    What I'm trying to do is say the user types in -100000 for a loan amount
    or "two" for the rate. I'm trying to give them an error message and put them back into putting in the loan amount or rate....
  16. Thread: ParseDouble.

    by Ancharius
    Replies
    2
    Views
    253

    Re: ParseDouble.

    Thanks so much!
  17. Thread: ParseDouble.

    by Ancharius
    Replies
    2
    Views
    253

    ParseDouble.

    Hello I have a couple of questions. I'm a newbie at Java programming and I have a project due tomorrow and because I cannot figure out how to do these things it's hindering my ability to complete my...
  18. Re: Beginner at Java, Need help with my project its due tuesday.

    for the math I tried breaking it down but still doesn't calculate correctly.


    double calc1 = loan * rate;
    double calc2 = Math.pow(1 + rate, months);
    double calc3 = Math.pow(1 +...
  19. Beginner at Java, Need help with my project its due tuesday.

    Guidelines

    This assignment is comprised of modifying your program which will calculate a monthly a moritzed amount (e.g. a house mortgage). For this program, you are to add the logic to prompt the...
  20. Re: Having a bit of trouble trying to loop my project.

    I'll try that. Because I noticed every time that I did my math it came out incorrect numbers. When I compare my code to the formula they are the exact same. But maybe that will help Java make the...
  21. Re: Having a bit of trouble trying to loop my project.

    Can anyone help me out with the math on here?


    //calculation monthly
    monthlypay1 = loanamount * rate / (Math.pow(1 + rate, months)) / (Math.pow(1 + rate, months)-1);

    Is what I have.....
  22. Re: Having a bit of trouble trying to loop my project.

    Ok I used the code you had as a guideline .



    public class Monthypayment2 {
    private static double monthlypay1;
    private static String choice;
    private static boolean n;
    private...
  23. Re: Having a bit of trouble trying to loop my project.

    Ah ok That was going to be my next question. Thanks a lot!




    int repeat = 0;

    while (monthlypay1 < 0) {
    System.out.print("You need to enter positive numerical data!");}
    ...
  24. Re: Having a bit of trouble trying to loop my project.

    Ok so basically in my case I can change "int repeat = 0" to be repeat = y;
    and while y.equals(true);?
  25. Re: Having a bit of trouble trying to loop my project.

    No sir, For the most part i've just been looking at tutorials on websites but they have not been helping much.
Results 1 to 25 of 31
Page 1 of 2 1 2