Java Mortgage Calculator

Im having trouble making my GUI look the way I want it. Obviously I dont know enough about Gridlayout And I think I need to use GridBagLayout instead. I need the amortization schedule to print all the way out and everything to line up. If anyone has some suggestions I would love to hear it, and yes, this is my homework. see the code below:
Main java file: implements MyFrame4 java file
import java.awt.*; //imports awt
public class MortgageCalculator4 {   // main MortgageCalculator class constuctor
public static void main(String args[]) {  //implements MyFrame4
Frame f = new MyFrame4();
} //end of MortgageCalculator4 class
Adapter java file: implements WindowAdapter
import java.awt.*; //imports awt
import java.awt.event.*;
class MyAdapter extends WindowAdapter {   //creates window adapter
Frame myFrame;
MyAdapter(Frame f) {
super();
myFrame = f;
public void windowClosing(WindowEvent e) {
myFrame.dispose();
} //end of MyAdapter class
Frame java file: main body of program implemented by MortgageCalculator file
import java.awt.*; //imports awt's
import java.awt.event.*;
import java.text.DecimalFormat;
import javax.swing.*;
class MyFrame4 extends Frame implements TextListener, ActionListener {    //class constructs the frame and layout
Button loanButton1 = new Button("Loan 1"), //creates and labels buttons
loanButton2 = new Button("Loan 2"),
loanButton3 = new Button("Loan 3"),
clearButton = new Button("clear/New");
TextField principalField = new TextField("0.00", 15), //sets TextField properties
rateField = new TextField("0.00", 3), //adds field lenghts and initial properties
yearsField = new TextField("0", 3),
paymentField = new TextField("0.00", 15),
intpaymentTextArea = new TextField("0.00", 40);
double principal, rate, ratePercent; //assigns variables
int years, n;
final int paymentsPerYear = 12;
final int timesPerYearCalculated = 12;
double effectiveAnnualRate;
double payment;      
public MyFrame4() { //beginnig of frame constructor
setTitle("Mortgage Payment Calculator");
setLayout(new GridLayout(14, 2));
Label title1Label = new Label("Enter loan amount then select a loan option");
Label title2Label = new Label("or enter an interest rate and years");
Label principalLabel = new Label("Loan Amount $"), // constructs labels
rateLabel = new Label("Rate (%)"),
yearsLabel = new Label("Years"),
loan1Label = new Label("7 years at 5.35%"), //asigns labels
loan2Label = new Label("15 years at 5.5%"),
loan3Label = new Label("30 years at 5.75%%"),
paymentLabel = new Label("Payment $"),
intpaymentLabel = new Label("Ammortization Schedule");
Panel title1LabelPanel = new Panel (new FlowLayout(FlowLayout.RIGHT));
Panel title2LabelPanel = new Panel (new FlowLayout(FlowLayout.RIGHT));
Panel principalLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)), // places label positions and button panels
loan1LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
loan2LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
loan3LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
rateLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
yearsLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
paymentLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
intpaymentLabelPanel = new Panel(new FlowLayout(FlowLayout.CENTER));
Panel principalFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
loan1ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
loan2ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
loan3ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
rateFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
yearsFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
paymentFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
clearButtonPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
blankPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
intpaymentTextAreaPanel = new Panel(new FlowLayout(FlowLayout.RIGHT));
title1LabelPanel.add(title1Label);
title1LabelPanel.add(title2Label);
principalLabelPanel.add(principalLabel); //adds labels buttons and fields
principalFieldPanel.add(principalField);
loan1LabelPanel.add(loan1Label);
loan1ButtonPanel.add(loanButton1);
loan2LabelPanel.add(loan2Label);
loan2ButtonPanel.add(loanButton2);
loan3LabelPanel.add(loan3Label);
loan3ButtonPanel.add(loanButton3);
clearButtonPanel.add(clearButton);
rateLabelPanel.add(rateLabel);
rateFieldPanel.add(rateField);
rateField.setEditable(true);
yearsLabelPanel.add(yearsLabel);
yearsFieldPanel.add(yearsField);
yearsField.setEditable(true);
paymentLabelPanel.add(paymentLabel);
paymentFieldPanel.add(paymentField);
paymentField.setEditable(false);
intpaymentLabelPanel.add(intpaymentLabel);
intpaymentTextAreaPanel.add(intpaymentTextArea);
intpaymentTextArea.setEditable(false);
add(title1LabelPanel);
add(title2LabelPanel);
add(principalLabelPanel);
add(principalFieldPanel);
add(loan1LabelPanel);
add(loan1ButtonPanel);
add(loan2LabelPanel);
add(loan2ButtonPanel);
add(loan3LabelPanel);
add(loan3ButtonPanel);
add(rateLabelPanel);
add(rateFieldPanel);
add(yearsLabelPanel);
add(yearsFieldPanel);
add(paymentLabelPanel);
add(paymentFieldPanel);
add(clearButtonPanel);
add(intpaymentLabelPanel);
add(blankPanel);
add(intpaymentTextAreaPanel);
loanButton1.addActionListener(this); //assigns ActionListener to buttons
loanButton2.addActionListener(this);
loanButton3.addActionListener(this);
clearButton.addActionListener(this);
principalField.addTextListener(this); //adds TextListener to fields
rateField.addTextListener(this);
yearsField.addTextListener(this);
addWindowListener(new MyAdapter(this));
pack(); //resizes window to fit components
setVisible(true);
DecimalFormat currency = new DecimalFormat("####0.00"); //sets currency format
public void actionPerformed(ActionEvent e){ //checks for buttons clicked and sets variables to fields
     //wanted to get data from array but couldnt make it work
          if(e.getSource() == loanButton1){
               rateField.setText("5.85");
               yearsField.setText("7");
     if(e.getSource() == loanButton2){
               rateField.setText("5.5");
          yearsField.setText("20");           
          if(e.getSource() == loanButton3){
               rateField.setText("5.75");
          yearsField.setText("30");     
          if(e.getSource() == clearButton){
               rateField.setText("0.00");
          yearsField.setText("0");
          principalField.setText("0.00");           
public void textValueChanged(TextEvent e) {  //checks field variables and sends to calculations
Object source = e.getSource();
if (source == principalField
|| source == rateField
|| source == yearsField) {
try {
principal = Double.parseDouble(principalField.getText()); //perform calculations for payment
ratePercent = Double.parseDouble(rateField.getText());
rate = ratePercent / 100.0;
years = Integer.parseInt(yearsField.getText());
n = paymentsPerYear * years;
effectiveAnnualRate = rate / paymentsPerYear;
payment =
principal
* (effectiveAnnualRate
/ (1 - Math.pow(1 + effectiveAnnualRate, -n)));
DecimalFormat payForm = new DecimalFormat("####.##"); //performs calculations for Ammortization text area
int num_Months = years*12;     
double i = ratePercent/1200;
payment = principal*((i*(Math.pow((1+i),num_Months)))/((Math.pow((1+i),num_Months))-1));               
int num_Payments = num_Months-1;
int month_counter = 0;
double intPaid = 0;
double balance = principal;
intpaymentTextArea.setText("");
while (month_counter <= num_Months){
intPaid = balance * i;
balance = balance - (payment - intPaid);
intpaymentTextArea.setText(("Month ")+month_counter+( " - Payment: $")
payForm.format(payment)" Balance: "
payForm.format(balance)(" Interest Paid: $")
payForm.format(intPaid)"\n");
month_counter++;
paymentField.setText(currency.format(payment)); //display payment
} catch (NumberFormatException ex) {  //catch exceptions
} //end of MyFrame4 Class

Another suggestion is post only the necessary code that exemplifies the unexpected behavior, and don't forget to use code tags when you're posting code. Look for CODE button when writing the post! This way your code will be well formatted and more readable. It also increases the chance of someone reading it and help you.

Similar Messages

  • Mortgage Calculator in Java

    Can anyone help me figure out how to change my mortgage calculator to do the following?
    Modify the mortgage program to display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list. Do not use a graphical user interface. Insert comments in the program to document the program. Here is the code I have currently.
    import java.io.*;
    import java.text.DecimalFormat;
    public class MortgageRateWeek3Test
         public static void main(String[] args) throws IOException
              //Declaring and Constructing Variables
              int iTerm;
              double dInterest = 5.75;
              double dPayment, dRate, dAmount = 200000, dMonthlyInterest,dMonthlyPrincipal, dMonthlyBalance;
              DecimalFormat twoDigits = new DecimalFormat("$#,000.00");
                        //Calculations Retrieved from http://www.1728.com/loanform.htm on 9/14/05
                        dRate = dInterest / 1200;
                        iTerm = 360;
                        dPayment = (dAmount * dRate) / (1 - Math.pow(1 / (1 + dRate), iTerm));
                        dMonthlyInterest = (dAmount / 12) * (dInterest / 100);
                        dMonthlyPrincipal = (dPayment - dMonthlyInterest);
                        dMonthlyBalance = (dAmount - dMonthlyPrincipal);
                                  // Output dPayment
                                  System.out.println();
                                  System.out.println("\tYour Monthly Payment is: " + twoDigits.format (dPayment));
                                  System.out.println();
         public class monthlyInterest
              //Declaring Variables for monthlyInterest
              double dMonthlyInterest = 0.0;
              double dAmount = 0.0;
              double dInterest = 0.0;
                   //Calculations for monthlyInterest
                   dMonthlyInterest = (dAmount / 12) * (dInterest / 100);
              return dMonthlyInterest;
         public static double monthlyPrincipal()
              //Declaring Variables for monthlyPrincipal
              double dMonthlyPrincipal = 0.0;
              double dPayment = 0.0;
              double dMonthlyInterest = 0.0;
                   //Calculations for monthlyPrincipal
                   dMonthlyPrincipal = (dPayment - dMonthlyInterest);
              return dMonthlyPrincipal;
         public static double monthlyBalance()
              //Declaring Variables for monthlyBalance
              double dMonthlyBalance = 0.0;
              double dAmount = 0.0;
              double dMonthlyPrincipal = 0.0;
                   //Calculations for monthlyBalance
                   dMonthlyBalance = (dAmount - dMonthlyPrincipal);
              return dMonthlyBalance;
    }

    There are imports that aren't available to us, so no. nobody probaly can. Of course maybe someon could be bothered going through all of your code, and may spot some mistake. But I doubt they will since you didn't bother to use [c[b]ode] tags.

  • Graphical chart in a mortgage calculator

    I need to add a graphical amortization chart to my mortgage calculator program.
    I don't have a clue how to start. Does anyone know of any reading material
    I could get my hands on that would help me out?
    An example to work with would be nice, but I will settle for
    some extra reading material to study.
    thank you.

    I don't think I am allowed to use third party stuff
    what I need to do is devise a chart that will show the interest paid as well as the principal payment as two lines on an a graph
    when you change the interest rate and term of the loan
    and recalculate. the graph shows the new interest and principal

  • Java number calculation.

    hi, i am doing java encryption/decryption and my key is 128 bits. i need to times multiple keys and thus, the value is far exceed the integer and long value.
    thus i decide to use math.biginteger.
    however, the calculation is weird.
    here is my code
    BigInteger biPdi = new BigInteger(bPdi); //bPdi is a bytearray
    BigInteger biKey = new BigInteger(groupKey);//group key is a bytearray
    BigInteger bicKey = new BigInteger(bicGroupKey));//bicgroupkey is a bytearray
    System.out.println("derivationkey: " + biPdi.toString(16));
    System.out.println("child group key: " + bicKey.toString(16));
    b = biPdi.add(bicKey).toByteArray();     
    BigInteger bit2 = new BigInteger(b);
    System.out.println("derivationkey: " + bit2.toString(16));
    this is the result i am getting back.
    derivationkey: 30
    child group key: 3938393951128f27c3da559f36ea62de
    derivationkey: 3938393951128f27c3da559f36ea630e
    i know the derivationkey has value "0" which is encode as "30" b/c it is based on 16. thus, the byte value is "48" which is the value of "0".
    when i add derviationkey with child group key, i expect to my new diviationkey is same as childgroup key b/c it is childgroup plus 0. however, i am getting a different value. i think the reason is because java byte array try to add 30 to childgroup.
    in this case, how can i do a large number calculation? can someone give me any advice??
    Thanks in advance.

    There's a button what says "code." Hit it and put your code inside the tags.
    i know the derivationkey has value "0" which is
    encode as "30" b/c it is based on 16. thus, the byte
    value is "48" which is the value of "0".0 is zero no matter what the base. And 48 != 0 no matter how much paint you sniff (though it can seem that way).
    when i add derviationkey with child group key, i
    expect to my new diviationkey is same as childgroup
    key b/c it is childgroup plus 0. however, i am
    getting a different value. i think the reason is
    because java byte array try to add 30 to childgroup.If it's 30 and you add it, the answer will come out as 30 more than the number you added to 30.
    in this case, how can i do a large number
    calculation? can someone give me any advice??BigInteger works like it should. derivationkey is 30.
    ~Cheers

  • How do I add a mortgage calculator or any calculator

    how do I add to a realtors website a mortgage calculator

    Hi,
    I was wondering if there is a way of adding a different type of calculator into Muse.  I am opening a printing business and would like to have a calculator for clients to be able to calculate the price of their prints based on the dimensions they choose.  The client would enter the height and width of his/her print and get the price automatically calculated for them.  I also would like for the calculator to give the client the minimum number of pixels to produce such print.  I can create such calculator on Excel.  Would it be possible to embed it into Muse somehow?  Many thanks for your help!

  • Java variables calculation on change in JSP (Excel replica)

    I have a excel sheet that I need to replicate in JSP (using struts 1 framework). Now everything is done but I am stuck at the calculation part. As you might have seen in excel, some columns are calculations based on other columns.
    So if I change field 'a', 'd' field should change automatically based on its formula (let's say, d=a*1.1 +b*2.1).
    Now I tried to use the funstion in javascript where I read 'a' and 'b' values from JSP, then I calculate and everything works fine. But when I try to assign the calculation result for field 'd' in JSP throush javascript, 'd' does not change.
    function adjustCalcs ()
    var a = eval("document.form.al.value");
    var b = eval("document.form.b.value");
    var dCalc = ((a * 1.05) + (b * 1.1));
    document.form.d.value = dCalc ; (this is where it should change the value of field 'd' in JSP, but ti won't...donno why?)
    Or is there any better way to do these dynamic changes in JSP ? Would appreciate the insight.
    Thanks,

    Fine. What's your problem in JSP side then? Do you want to let Java take over the calculation and "dynamic stuff" ? Then you need to let Javascript submit the form to the server side during the change event so that JSP can then display the result using taglibs/EL. But this is less good for user experience as this costs effectively one HTTP request and the user would see a "flash of content". Alternatively you can use Ajax for this to do it all asynchronously.

  • Java Memory Calculation

    Dear all,
    I have class
    Student{
    private int id;
    And my program, init array 10000000 student object.
    size = 10000000;
    Student[] sts = new Student[size];
    for(int i = 0; i< size; i++){
    sts[i] = new Student();
    Learning from
    http://www.javamex.com/tutorials/memory/object_memory_usage.shtml
    and
    http://www.javamex.com/tutorials/memory/array_memory_usage.shtml
    I calculation the memory usage for my programe is
    - 8: house keeping
    - 4 leng
    - size * 4 (object reference)
    - Each Student object size take (8 byte house keeping + 4 byte for id) = 12, padding 4 => 16 byte
    So the total memory is 8 + 4 + 4*size + 16*size = 20*size + 12 ~ 190M
    But the momory usage for my program is 277MB. That is the large difference.
    Could you give me some advice?
    Thank a lot for support.

    Helo..
    Using Windows Task manager is not the proper way to measure a Java programs Memory usage.
    Reason:When you run a java program ,it also requires the underlying JRE to run ,so the memory used for a java process in this case would be the memory for the Java programs Objects and also for the entire JRE.
    The Best way to measure your application's performance is use either of the two free tools:
    1.JConsole-its comes along with JDK. JDK_HOME/bin/jconsole
    2.Any Profiler Programs:A profiler for Java is a program which allows you to trace a running java program and see the memory and CPU consumption for the Java application.Netbeans comes with its own profiler.you can chk this out.
    The other option is to measure free memory before and after execution of the program using System Util Class.
    Hope this clarifies your qn.
    Thanks.

  • Java Double calculations produce greater error than C++?

    I wrote PLU (A=PLU) decomposition program in Java to solve Ax=B. A, P,L and U are square arrays. x and B are vectors. The error was great for large matrices.My instructor suggested me to use C++. So, I wrote the same thing in C++. The error is much less now. The code is almost identical. I thought that both languages use the same IEEE standard.
    Is it possible that java handles double calculations worse than C++ does?

    tmirzoev wrote:
    matrix A and B are known. So, after my program computes x, I do Ax-B. Ideally, Ax-B=0. But that never happens because of the errors in floating point calculations. The problem that in Java that error Ax-b is much greater than in C++.Okay, but how do you know that Ax-b is greater in Java? Show your Java code and your C++ code.

  • Java simple calculation involving double

    *public static void main(String[] args) {*
    System.out.println("Output "+300.025d100.0);*
    The above code is returning me 30002.499999999996 though I was expecting 30002.5

    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    public class Test {
    NumberFormat f = new DecimalFormat("0.0");
    System.out.println("Output "+new Float(f.format(300.025d*100.0)));
    }

  • Java algorithm calculation

    At first, I want to get the distance calculation from Damansara and Punchong. Below is the x, y position in graph (map)
    /** Calculate the direct distance between 2 cities**/
    * @param from the first city*
         * @param to the second city*
         * @return the distance between them*
    *private double calculateDistance(City from, City to) {*
    double xDiffSqr = ( from.x - to.x ) * ( from.x - to.x );
    double yDiffSqr = ( from.y - to.y ) * ( from.y - to.y );
    return Math.sqrt(xDiffSqr + yDiffSqr);
    Base on the calculation I apply to this answer�
    Damansara� 288 - 39
    Puchong � 216 - 390
    Formula calculation
    xDiffSqr = (288 � 216) (288 � 216)*
    yDiffSqr = (39 � 390) (39 � 390)*
    return Math sqrt(5184 + 123201) = 358.31 //square root
    then�follow with this function to get the total short distance
    *     * To calculate this path total distance in KM*
    *     * @return*
    *     public String getDistance() {*
    *          String distance = totalDistance / 20 + "";*
    *          for (int i = 0; i < distance.length() ; i++) {*
    *               if(distance.charAt(i) == '.') {*
    *                    if(distance.length() - 1 - i > 2) {*
    *                         distance = distance.substring(0, i + 3);*
    *                         break;*
    *                    else*
    *                         break;*
    *          return distance + " Km";*
    I try to use 358.31 to divide 20 = 17.91km
    The system return 18.72km..why why why?

    First you calculate distance using double arithmetic.
    Then you follow with code (which is not a function and is all commented out) where suddenly distance is a String and you are doing some kind of string parsing...
    why why why?
    What you supply is NOT code. We can neither debug nor explain the results of, "I did some stuff that I don't explain to you and got a result that surprised me."

  • Acrobat Pro 9, why is it ignoring my java script calculations?

    I am using a PC with Windows XP on it. This has happened many times, and I cant figure it out. I have layed out all of my cells and have given one column the java script commmand to subtract two other columns. I saved it, tested it, closed it, opened it and tested it again. Everything worked fine. I have come back into work this morning to find that the java script is still there and there are still 0's in the column, but it will not calculate anything. What's wrong?
    thanks!

    What  extra work! two, three lines of extra code (may just one) to put a time limit in, that can be overridden with entering a bought serial number. Even shareware peopel do it.
    And I remeber when Acrobat only worked on Mac's. You see it was introduced to Mac's first. Microsoft wouldn't allow it until version 3 or 4.  If I still had my 7100/66 I might could prove was I one of the beta Testers. But that machine was traded in on the G4-500 (which I still own).
    Most major software companies will come out with a new application on the Mac first. Because Mac users tend tobe willing to try out something new on the cutting edge. Then when its prefected they come out with a PC version, and forget about the Mac community.
    Look I am 61. And I didn't just fall off the turnip truck yesterday. I've been around since before the days of the moden internet. I  started with Buliten Boards on 300 baud modem on an old fashion POTS line.  Cost me a fortune in Phonebills
    So don't discount my experiences so lightly. I've used appliactions such as ATM Aldus PageMaker (yes you heard right Aldus). I've use Word Perfect for Mac and PC back when it was owned by WordPefect, then Novell) I've use Microsoft works when it came out for the SE/30. Lotus 1-2-3 both on Mac and PC, FaxSTF, and other that are now none existent on the Mac. Chance are I was using Computers about the same as some of you and probabaly earlier than some. I lived it.

  • No idea about Java or calculating script

    My problem is most likely a pretty simple one (not for me however).   I have eight boxes with user entered numbers and one box at the bottom that needs to total the amounts from the other boxes.   This total needs to be calculated ONLY when the checkbox next to each user entered number is checked.   I am so lost when it comes to this stuff.  Any help, without the script-speak or computer elitest terms, would be greatly appreciated.   I made the document in word, created a PDF and have edited it entirely through LiveCycle.   Thanks for the help.

    Hi,
    Mind if I chime in?
    I would do this using formCalc and a loop with a test for each checkbox. Put the script on the Grand Total field Calculate event:
        $ = 0
        var total = 0
        for i = 0 upto 8 do
            if (RowItem[i].CheckBoxAccept == "1") then
                 total = RowItem[i].NumItemAmt + total
            endif
            continue
        endfor
        $ = total
    Then I would have a "Accept All" checkbox (instead of clicking 9 times if you want to accept everyhing). Put a checkbox in the total row and on the Change event using formCalc like this:
        if ($ == "1") then
            RowItem[*].CheckBoxAccept = "1"
        elseif ($ == "0") then
            RowItem[*].CheckBoxAccept = "0"
        endif
        xfa.form.execCalculate()
    These 2 scripts may be one of the shortest ways to fo it. You have to name all the like items the same. And, you can easily adapt this for having multiple instances.
    Good luck!
    Stephen

  • Java code calculating digits of PI

    Anyone have any links to code that does this quickly?
    More specifically, I'm looking to calculate the hexadecimal digits quickly. So either do that or calculate base 10 and convert them fast.
    [I don't need the Bailey-Borwein-Plouffe Algorithm as I don't want individual digits, I want the first 10,000]
    cheers for any help

    For some of the maths (and other links),
    http://www.cecm.sfu.ca/pi/piquest/
    In c++,
    http://pw1.netcom.com/~hjsmith/Pi/PiW.html
    http://sourceforge.net/snippet/detail.php?type=snippet&id=100622
    Converting number to hex string,
    http://sourceforge.net/snippet/detail.php?type=snippet&id=100683

  • Java holiday calculation

    This must be Global Crossposting Day.

    If you're a good little crossposter, Majinda will come on his eight chickens and leave something for you.

  • Inserting Images into Acrobat Pro Form And using java script calculation to change it

    Hi,
    I am trying to create a form witch shows text results bassed of tick boxes and I have managed to be able to do that but I need to have icons shown along side them based upon the result and I am not even sure how to input images in the first place.
    I read somewhere that I have to use the content pane but I dont have it and it is not selectable in the view options.
    Also the image I am trying to insert is .ai will it need to be .jpg or .png?
    any help would be greatly aprectiated!
    Thanks,
    Bruce

    That works the only thing is that when another one is selected it stays visible i have tried this
    this.getField("Button1").display = event.target.value=="Off" ? display.hidden : display.visible;
    this.getField("Button2").display = event.target.value=="On" ? display.hidden : display.visible;
    this.getField("Button3").display = event.target.value=="On" ? display.hidden : display.visible;
    this.getField("Button4").display = event.target.value=="On" ? display.hidden : display.visible;
    and alternated them between which one needs to work but that didnt work either, any ideas?
    Thanks,
    Bruce

Maybe you are looking for

  • Getting error while installing sql server std 2008 R2 on win 7 prof. sp1 64bit

    Hi, I am getting error while installing sql server std 2008 R2 on win 7 prof. sp1 64bit. I have already tried all option but fail to installation an error during the installation of assembly micro soft.vc80.crt

  • Upgraded to Lion, now iMovie opens then crashes. Please help.

    I upgraded to Lion a couple days ago and now each time I open iMovie, it acts like it's going to work and 10 seconds later it crashes.  This is the 'error message' I get. Hopefully this will make sense to someone out there...   Thank you for your hel

  • Trying to launch Flash builder 4 results in a crash.

    Hi, After installing the Flash builder 4 any attemp to launch it results in a crash with the following message : A fatal error has been detected by the Java Runtime Environment:   Internal Error (0xe06d7363), pid=2612, tid=2548 JRE version: 6.0_16-b0

  • F.C.E. 4  not HD

    F.C.E. 4 I have filters on the audio sections of the sequences that somehow I have applied to all. I cannot remove them - anyone any ideas please?

  • Random crashing Logic Pro X, please help!

    Hi guys, I've been using Logic Pro X for several months now, and it's been pretty stable. In the past few days, however, it's crashing all the time. I've tried deleting the Logic Pro pref file and Logic Pro X control surface pref file, but still cras