From validation got error don't understand??

Hi every one!
I got an error that I don't understand.
http://www.globallingua.com.mx/idiomas.php
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.globallingua.com.mx%2Fidiomas.php&chars et=%28detect+automatically%29&doctype=Inline&ss=1&group=0&No200=1
Can any body explain me this please, I’m newbie on this
an the rest of the site don’t got error and was created with
the same tools.
Thankx in advanced
Cheers!

.oO(speculumcm)
> I got an error that I don't understand.
>
>
http://www.globallingua.com.mx/idiomas.php
>
>
>
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.globallingua.com.mx%2Fidiomas
>.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&No200=1
>
> Can any body explain me this please, I?m newbie on this
an the rest of the
>site don?t got error and was created with the same tools.
Never seen this error before, but one thing that's wrong is
the missing
space between the attributes of the 'a' in line 125
(shortened):
<a href="javascript:; "onclick="var ...">
Change it to
<a href="javascript:;" onclick="var ...">
HTH
Micha

Similar Messages

  • Try to retrieve data from database got error message

    Try to retrieve data from database got error message *"java.lang.ArrayIndexOutOfBoundsException: 2*
    *     sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1023)*
    *     sun.jdbc.odbc.JdbcOdbcPreparedStatement.setDate(JdbcOdbcPreparedStatement.java:811)*
    *     guestbk.doGet(guestbk.java:32)*
    *     guestbk.doPost(guestbk.java:73)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:710)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)"*
    I have used prepared statment
    java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yy");
                java.util.Date dt = sdf.parse(str3);
                       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                       con=DriverManager.getConnection("jdbc:odbc:gbook");
                       //Statement stmt=con.createStatement();
    PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
    ps.setString(1,str1);
    ps.setString(2,str2);
    ps.setDate(3,new java.sql.Date(dt.getTime()));
    //ps.executeQuery();
                       //ResultSet rs=stmt.executeQuery("select * from gbook where emailid = str1");
                  ResultSet rs = ps.executeQuery();
                       out.println("<Html>");
                    out.println("<Head>");
                       out.println("<Title>GuestBook</Title>");
                       out.println("</Head>");
                       out.println("<Table border=1 align=center >");
                       out.println("<H4><B><center>Teacher's Lesson Plan</center></B></H4><BR>");
                       out.println("<TR><TD><b>Teacher Name</b></TD><TD><b>Class</b></TD></TR>");
               while(rs.next())
                        ctr++;
                        String email=rs.getString("emailid");
                        String cmt=rs.getString("comment");
                        out.println("<TR><TD>"+email+"</TD><TD>"+cmt+"</TD></TR>");
            }Please anybody help .

    PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
    ps.setString(1,str1);
    ps.setString(2,str2);
    ps.setDate(3,new java.sql.Date(dt.getTime()));Your SQL query has 2 placeholders but you try to set 3 values.
    And didn't you read the stack trace?
    guestbk.doGet(guestbk.java:32)You could've tracked down line 32 and seen what was there at that line.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://www.catb.org/~esr/faqs/smart-questions.html
    ----------------------------------------------------------------

  • HT203180 shows (I already of 5 of them) now it says they can't be played on my ipod, and I purchased them from Itunes? I don't understand why they won't work?

    I purchased the remainder of shows (I already of 5 of them) for a TV series now it says they can't be played on my ipod, and I purchased them from Itunes? I don't understand why they won't work? I tried the conversion but it's greyed out and not chooseable. But again purchased from itunes so they should work according to the above article. Can anyone help me?

    Dracwolley wrote:
    They can. The video needs to be converted, though. If it's in your library, just go to Advanced (in the top menu), then click on "Make iPod/iPhone Version." Wait a while, and when it's done, click and drag. Or for a quicker alternative and less space lost on the iPod, download Handbrake here.
    Yep.

  • Generate Report From Template (Excel).vi & don't understand to fill the cells

    I am trying to use the Generate Report From Template (Excel).vi to build my own template, and then fill it with some of my datas. I am trying to replace the "temperature" or "pressure" labels by others, and then fill them with my vi. I don't understand how labview find the location of the labels in the excel template.
    Thanks in advance
    Attachments:
    Excel_Template.xls ‏33 KB
    Generate_Report_From_Template_(Excel).vi ‏120 KB

    You can get the answer to your question by reading the following thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000019360100&HTHREAD=000079385000079477000079498000079542000079632&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    The short answer:
    To setup or modify the Named Labels in your Excel template, use Excel's Insert -> Name -> Define command. A name can be defined as a single cell or a block of cells.
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Unflatten variant from string got error 122

    Hello,
    In this VI, when I used a 13 characters string to write flattened data to a file, I got error 122 when reading and unflattening it back. But with string that was not 13 characters, the unflattening operation worked just fine.
    Any ideas ?
     

     crossrulz is totally right about EOL interpretation when writing files. This has to do with 13 chars length string.
    Thanks for helping me out !

  • Java Error - Don't Understand...

    Hi, everyone. I don't know Java nor will I pretend to have any clue what I am talking about - I just need to know what my next step should be to resolve this bizarre problem.
    My boss got this java code for a calculator YEARS ago for our websites, no telling how many years and he can't remember from where. Now, all of a sudden when we go to that page on our web sites it won't come up. On my computer I did get an orange box to come up in place of the calculator, so I click on it and all of a sudden the calculator works again. BUT I haven't had the same luck on ANY other computer. One of our other computers just has a red X in the corner, I right clicked on it and I got the JAVA Console with this message:
    Java Plug-in 1.6.0_02
    Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Jennifer Spears
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class LensCalculator.class not found.
    java.lang.ClassNotFoundException: LensCalculator.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 10 more
    Exception in thread "Thread-6" java.lang.NullPointerException
    at sun.plugin.util.AnimationPanel.createTranslucentImage(Unknown Source)
    at sun.plugin.util.AnimationPanel.createGradientShapeImage(Unknown Source)
    at sun.plugin.util.AnimationPanel.initBackground(Unknown Source)
    at sun.plugin.util.AnimationPanel.preloadResources(Unknown Source)
    at sun.plugin.util.AnimationPanel.doPaint(Unknown Source)
    at sun.plugin.util.AnimationPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Can someone just tell me what is going on? Why is it working on my computer an no ones else's? Why did this happen all of a sudden, does it have to do with an update in JAVA?
    Thanks in advance for any suggestions!

    load: class LensCalculator.class not found.Well this line saids it all. The compiler could not find a class named LensCalculator. Make sure the class is in the same directory as your other Java files or import it inside your code

  • I don't understand my errors (validator)

    I checked my html and css in a validator and I don't understand my errors.
    For html:
    Line 22, Column 32: An a start tag seen but an element of the same type was already open.
                          <li> <a href="index.html">portfolio </a></li>
    And for CSS:
    Value Error : background-image attempt to find a semi-colon before the property name. add it
    Parse Error :(../images/linkedin-logo.png)
    .button-linkedin {
              background-image: url:(../images/linkedin-logo.png);
              height: 3rem;
              width: 3rem;
              float: right;
              margin-top: 4.5rem;
              margin-right: 3rem;

    You have an unclosed <a> tag somewhere higher up in your code.  Look at your pinterest link which I spotted on line 16 from another discussion.
    http://forums.adobe.com/message/5267843#5267843
    In your CSS, change this:
    url:(../images/linkedin-logo.png);
    to this -- no colon between url & parenthesis:
    url(../images/linkedin-logo.png);
    HTML & CSS Tutorials -
    http://w3schools.com/
    Nancy O.

  • Don't understand why WSDL isn't valid

    In Workshop 9.2, I'm developing an annotation-based web service. I imported my schemas and generated the xmlbeans, and after setting my input and output parameters in the service class, I tried to generate the WSDL from the service. For some reason, the WSDL is not valid, and I don't understand why. I'm sure it's a namespace issue, but I don't see it.
    The enclosed WSDL is somewhat paraphrased from the generated WSDL.
    On line 76 (marked with a comment), there is the first of several errors. It says:
    "The input element is referencing an undefined message 'overrideRequest'. Check that the message name and namespace are correct and that the message has been defined."
    Here is the WSDL:
    <?xml version='1.0' encoding='UTF-8'?>
    <s0:definitions name="SampleServiceDefinitions"
    targetNamespace="http://schemas.wamu.com/Sample.wsdl"
    xmlns=""
    xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://schemas.wamu.com/Sample.wsdl"
    xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:questions="http://schemas.wamu.com/2006/07/QuestionsRequest"
    xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    <s0:types>
    <xs:schema targetNamespace="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="loanSampleRequest">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:loanProperties"/>
    </xs:sequence>
    <xs:attribute name="modelVersion" type="xs:integer" use="optional"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="loanSampleResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:loanProperties"/>
    <xs:element ref="ratings:messages"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="loanProperties">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" ref="ratings:property"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="property">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:key"/>
    <xs:element ref="ratings:value"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="key" type="xs:string"/>
    <xs:element name="value" type="xs:string"/>
    <xs:element name="messages">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ratings:message"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="message">
    <xs:complexType mixed="true">
    <xs:attribute name="level" type="xs:string"/>
    <xs:attribute name="fieldName" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </s0:types>
    <s0:message name="overrideRequest">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:message name="overrideRequestResponse">
    <s0:part element="ratings:loanSampleResponse" name="parameters"/>
    </s0:message>
    <s0:message name="ratingsRequest">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:message name="ratingsRequestResponse">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:portType name="Sample">
    <s0:operation name="overrideRequest">
    <s0:input message="tns:overrideRequest"/> <!-- 76 -->
    <s0:output message="overrideRequestResponse"/>
    </s0:operation>
    <s0:operation name="ratingsRequest" parameterOrder="parameters">
    <s0:input message="ratingsRequest"/>
    <s0:output message="ratingsRequestResponse"/>
    </s0:operation>
    </s0:portType>
    <s0:binding name="SampleServiceSoapBinding" type="tns:Sample">
    <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <s0:operation name="overrideRequest">
    <s2:operation soapAction="" style="document"/>
    <s0:input>
    <s2:body parts="parameters" use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body parts="parameters" use="literal"/>
    </s0:output>
    </s0:operation>
    <s0:operation name="ratingsRequest">
    <s2:operation soapAction="" style="document"/>
    <s0:input>
    <s2:body parts="parameters" use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body parts="parameters" use="literal"/>
    </s0:output>
    </s0:operation>
    </s0:binding>
    <s0:service name="SampleService">
    <s0:port binding="tns:SampleServiceSoapBinding" name="SampleSoapPort">
    <s2:address location="http://localhost:7001/Sample/Sample"/>
    </s0:port>
    </s0:service>
    </s0:definitions>
    --------------------

    After I made these changes and re-validated, I get a dialog that says "The WSDL file is valid however warnings have been issued. See the Problems view for a list of the validation warnings", and I see the following in the Problems list:
    IWAE0053E An internal error has occurred running validation on project:RiskRatingContainer]:RiskRatingContainer, check the log file for details
    In in my WSDL editor, the lines in question still have a red circle with a white "x" in the left margin, and the tooltip still reports the same errors as before.
    In the "Error Log" view, I see the following:
    *** ERROR ***: Thu Feb 22 12:10:09 PST 2007 org.eclipse.wst.validation.internal.core.ValidationException: IWAE0053E An internal error has occurred running validation on project:RiskRatingContainer]:RiskRatingContainer, check the log file for details
    Just in case, I'll include my current WSDL again here.
    <?xml version='1.0' encoding='UTF-8'?>
    <s0:definitions name="SampleServiceDefinitions"
    targetNamespace="http://schemas.wamu.com/Sample.wsdl"
    xmlns=""
    xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://schemas.wamu.com/Sample.wsdl"
    xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:questions="http://schemas.wamu.com/2006/07/QuestionsRequest"
    xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    <s0:types>
    <xs:schema targetNamespace="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="loanSampleRequest">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:loanProperties"/>
    </xs:sequence>
    <xs:attribute name="modelVersion" type="xs:integer" use="optional"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="loanSampleResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:loanProperties"/>
    <xs:element ref="ratings:messages"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="loanProperties">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" ref="ratings:property"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="property">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ratings:key"/>
    <xs:element ref="ratings:value"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="key" type="xs:string"/>
    <xs:element name="value" type="xs:string"/>
    <xs:element name="messages">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ratings:message"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="message">
    <xs:complexType mixed="true">
    <xs:attribute name="level" type="xs:string"/>
    <xs:attribute name="fieldName" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </s0:types>
    <s0:message name="overrideRequest">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:message name="overrideRequestResponse">
    <s0:part element="ratings:loanSampleResponse" name="parameters"/>
    </s0:message>
    <s0:message name="ratingsRequest">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:message name="ratingsRequestResponse">
    <s0:part element="ratings:loanSampleRequest" name="parameters"/>
    </s0:message>
    <s0:portType name="Sample">
    <s0:operation name="overrideRequest">
    <s0:input message="tns:overrideRequest"/> <!-- 76 -->
    <s0:output message="tns:overrideRequestResponse"/>
    </s0:operation>
    <s0:operation name="ratingsRequest" parameterOrder="parameters">
    <s0:input message="tns:ratingsRequest"/>
    <s0:output message="tns:ratingsRequestResponse"/>
    </s0:operation>
    </s0:portType>
    <s0:binding name="SampleServiceSoapBinding" type="tns:Sample">
    <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <s0:operation name="overrideRequest">
    <s2:operation soapAction="" style="document"/>
    <s0:input>
    <s2:body parts="parameters" use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body parts="parameters" use="literal"/>
    </s0:output>
    </s0:operation>
    <s0:operation name="ratingsRequest">
    <s2:operation soapAction="" style="document"/>
    <s0:input>
    <s2:body parts="parameters" use="literal"/>
    </s0:input>
    <s0:output>
    <s2:body parts="parameters" use="literal"/>
    </s0:output>
    </s0:operation>
    </s0:binding>
    <s0:service name="SampleService">
    <s0:port binding="tns:SampleServiceSoapBinding" name="SampleSoapPort">
    <s2:address location="http://localhost:7001/Sample/Sample"/>
    </s0:port>
    </s0:service>
    </s0:definitions>
    ---------------------------

  • I just got an Iphone and I can't email from it.  I received an email that said I needed to verify my email but when I did the message I got was: invalid account for this email address.  I don't understand.  Thoughts?

    I just got an Iphone and I can't email from it.  I received an email that said I needed to verify my email but when I did the message I got was: invalid account for this email address.  I don't understand.  Thoughts?

    If a phone is sold from one friend to another and wants to use it on a different carrier the friend can contact the carrier it was sold by to request it unlocked.  I know AT&T, Verizon, and Sprint will give you the steps to unlock it as long as the original contract it was bought under has been completed.  eBay/Craigslist is really not the best place to try to get "unlocked phones" from, if it turns out the phone isn't unlocked then I'm really sorry you got stuck with that one and as stevejobsfan said above I would report them immediately and see if you can recover your money.  I sell phones for a living and this happens a lot

  • Don't understand what this means I/O Error: import file

    I'm building a website in dreamweaver cs5 with a XML doctype. When I tried to validate my css I got an error code I don't understand. This is the error: I/O Error: import file:/Volumes/Macintosh%20HD/Users/schweideltyson/Desktop/CS%2080_final%20project/gallery .html: Operation not permitted. Any suggestions? The only thing I can think of is that I imported some text for my index page from another website.

    XML is used for data.  This is an example of a media playlist in XML.
    <?xml version="1.0" encoding="UTF-8"?>
         <playlist version="1" xmlns="http://xspf.org/ns/0/">
             <trackList>
                      <track><location>file:///mp3s/song_1.mp3</location></track>
                      <track><location>file:///mp3s/song_2.mp3</location></track>
                      <track><location>file:///mp3s/song_3.mp3</location></track>
             </trackList>
        </playlist>
    XHTML is for web pages. 
    http://www.w3schools.com/html/html_doctype.asp
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Got error "Your acct is not valid for use in the Israeli store.  You must switch to the US store before purchasing" while using an Israeli SIM card in Israel.  I switched to Israel on my PC at home in mu itunes acct, but now cant connect to iTunes. help?

    Got error "Your acct is not valid for use in the Israeli store.  You must switch to the US store before purchasing" while using an Israeli SIM card in Israel.  I switched to Israel on my PC at home in mu itunes acct, but now cant connect to iTunes. Help?

    found it!
    http://www.ehow.com/how_8202183_change-app-store-account-location.html
    Instructions
    1.      
    1Tap "Settings" from the main menu of your iOS device.
    2Tap "Store."
    3Tap "View Apple ID."
    4Enter your user name and password.
    5Tap the space underneath "Change Country or Region."
    6Select the region where you will be located.
    7Tap "Done."

  • Why is this an error???  I don't understand why it is... Help Please

    Hi,
    Ok, I'll preface this by saying there's a lotta code pasted in here but it really quite an easy question, I just need to post all the code so you understand where what came from.
    Now.............the question I'm trying to do is to create an applet that has 2 buttons -- each button when clicked opens an application (one is a simple calculator, the other a Mortgage calculation app). When you click one of the buttons (calc or mortgage), that app opens infront of the 2 button menu so its in "focus". The button on the 2 button menu then switches to a "hide app X" button (ie: "Mortgage", changes to "Hide Mortgage"). Thus if you click the hide button, the app that was opened is hidden, and then that "hide" button switches back to the original "app X" button. Pretty simple.
    Now, I have from my text book an example that does exactly this, with the simple calculator already in it, and with another app (a traffic light thing) where the Mortgage should be in my final product. I also already have the Mortgage applet I need to insert from another book example in place of that Traffic Light portion.
    Now, common sense would dictate that I should be able to just copy my code for the Mortgage applet into the example that has the 2 button menu structure, and overwrite the code I want to get rid of (the traffic light) with the mortgage code & rename the menu buttons. Right?? A simple switch of one thing for another... but therein lies my problem.
    I copied all the Mortgage code in correctly over the traffic lights, switched the button names, tried to compile it but I get one error....
    Exercise12_17.java:52: cannot resolve symbol
    symbol  : method pack ()
    location: class MortgageApplet
            mortgageAppletFrame.pack();I don't understand why..... mortgageAppletFrame.pack(); was a simple rewrite from lightsFrame.pack(); like every other line...... it should work. I've gone over it for 2 days......... Anyone know why it comes up as an error???
    Below, in order going down is (1)my code with the 1 error I can't solve, (2)the original menu example I tried to edit, and (3)the Mortgage app code...........
    Does anyone know what my error is?? Help or a hint would be greatly appreciated........ Thanks.
    My erroring app.......
    // Exercise12_17.java: Create multiple windows
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.TitledBorder;
    public class Exercise12_17 extends JFrame implements ActionListener {
      // Declare and create a frame: an instance of MenuDemo
      MenuDemo calcFrame = new MenuDemo();
      // Declare and create a frame: an instance of RadioButtonDemo
      MortgageApplet mortgageAppletFrame = new MortgageApplet();
      // Declare two buttons for displaying frames
      private JButton jbtCalc;
      private JButton jbtMortgage;
      public static void main(String[] args) {
        Exercise12_17 frame = new Exercise12_17();
        frame.setSize( 400, 70 );
        frame.setTitle("Exercise 11.8: Multiple Windows Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
      public Exercise12_17() {
        // Add buttons to the main frame
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(jbtCalc = new JButton("Simple Calculator"));
         getContentPane().add(jbtMortgage = new JButton("Mortgage"));
        // Register the main frame as listener for the buttons
        jbtCalc.addActionListener(this);
         jbtMortgage.addActionListener(this);
      public void actionPerformed(ActionEvent e) {
        String arg = e.getActionCommand();
        if (e.getSource() instanceof JButton)
          if ("Simple Calculator".equals(arg)) {
            //show the MenuDemo frame
            jbtCalc.setText("Hide Simple Calculator");
            calcFrame.pack();
            calcFrame.setVisible(true);
          else if ("Hide Simple Calculator".equals(arg)) {
            calcFrame.setVisible(false);
            jbtCalc.setText("Simple Calculator");
          else if ("Mortgage".equals(arg)) {
            //show the CheckboxGroup frame
            mortgageAppletFrame.pack();
            jbtMortgage.setText("Hide Mortgage");
            mortgageAppletFrame.setVisible(true);
          else if ("Hide Mortgage".equals(arg)) {
            mortgageAppletFrame.setVisible(false);
            jbtMortgage.setText("Mortgage");
      class MortgageApplet extends JApplet
      implements ActionListener {
      // Declare and create text fields for interest rate
      // year, loan amount, monthly payment, and total payment
      private JTextField jtfAnnualInterestRate = new JTextField();
      private JTextField jtfNumOfYears = new JTextField();
      private JTextField jtfLoanAmount = new JTextField();
      private JTextField jtfMonthlyPayment = new JTextField();
      private JTextField jtfTotalPayment = new JTextField();
      // Declare and create a Compute Mortgage button
      private JButton jbtComputeMortgage = new JButton("Compute Mortgage");
      /** Initialize user interface */
      public void init() {
        // Set properties on the text fields
        jtfMonthlyPayment.setEditable(false);
        jtfTotalPayment.setEditable(false);
        // Right align text fields
        jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
        jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
        jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
        jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
        jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
        // Panel p1 to hold labels and text fields
        JPanel p1 = new JPanel();
        p1.setLayout(new GridLayout(5, 2));
        p1.add(new Label("Annual Interest Rate"));
        p1.add(jtfAnnualInterestRate);
        p1.add(new Label("Number of Years"));
        p1.add(jtfNumOfYears);
        p1.add(new Label("Loan Amount"));
        p1.add(jtfLoanAmount);
        p1.add(new Label("Monthly Payment"));
        p1.add(jtfMonthlyPayment);
        p1.add(new Label("Total Payment"));
        p1.add(jtfTotalPayment);
        p1.setBorder(new
          TitledBorder("Enter interest rate, year and loan amount"));
        // Panel p2 to hold the button
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
        p2.add(jbtComputeMortgage);
        // Add the components to the applet
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listener
        jbtComputeMortgage.addActionListener(this);
      /** Handle the "Compute Mortgage" button */
      public void actionPerformed(ActionEvent e) {
        if (e.getSource() == jbtComputeMortgage) {
          // Get values from text fields
          double interest = (Double.valueOf(
            jtfAnnualInterestRate.getText())).doubleValue();
          int year =
            (Integer.valueOf(jtfNumOfYears.getText())).intValue();
          double loan =
            (Double.valueOf(jtfLoanAmount.getText())).doubleValue();
          // Create a mortgage object
          Mortgage m = new Mortgage(interest, year, loan);
          // Display monthly payment and total payment
          jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
          jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
    class MenuDemo extends JFrame implements ActionListener {
      // Text fields for Number 1, Number 2, and Result
      private JTextField jtfNum1, jtfNum2, jtfResult;
      // Buttons "Add", "Subtract", "Multiply" and "Divide"
      private JButton jbtAdd, jbtSub, jbtMul, jbtDiv;
      // Menu items "Add", "Subtract", "Multiply","Divide" and "Close"
      private JMenuItem jmiAdd, jmiSub, jmiMul, jmiDiv, jmiClose;
      /** Main method */
      public static void main(String[] args) {
        MenuDemo frame = new MenuDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
      /** Default constructor */
      public MenuDemo() {
        setTitle("Menu Demo");
        // Create menu bar
        JMenuBar jmb = new JMenuBar();
        // Set menu bar to the frame
        setJMenuBar(jmb);
        // Add menu "Operation" to menu bar
        JMenu operationMenu = new JMenu("Operation");
        operationMenu.setMnemonic('O');
        jmb.add(operationMenu);
        // Add menu "Exit" in menu bar
        JMenu exitMenu = new JMenu("Exit");
        exitMenu.setMnemonic('E');
        jmb.add(exitMenu);
        // Add menu items with mnemonics to menu "Operation"
        operationMenu.add(jmiAdd= new JMenuItem("Add", 'A'));
        operationMenu.add(jmiSub = new JMenuItem("Subtract", 'S'));
        operationMenu.add(jmiMul = new JMenuItem("Multiply", 'M'));
        operationMenu.add(jmiDiv = new JMenuItem("Divide", 'D'));
        exitMenu.add(jmiClose = new JMenuItem("Close", 'C'));
        // Set keyboard accelerators
        jmiAdd.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
        jmiSub.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
        jmiMul.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
        jmiDiv.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK));
        // Panel p1 to hold text fields and labels
        JPanel p1 = new JPanel();
        p1.setLayout(new FlowLayout());
        p1.add(new JLabel("Number 1"));
        p1.add(jtfNum1 = new JTextField(3));
        p1.add(new JLabel("Number 2"));
        p1.add(jtfNum2 = new JTextField(3));
        p1.add(new JLabel("Result"));
        p1.add(jtfResult = new JTextField(4));
        jtfResult.setEditable(false);
        // Panel p2 to hold buttons
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout());
        p2.add(jbtAdd = new JButton("Add"));
        p2.add(jbtSub = new JButton("Subtract"));
        p2.add(jbtMul = new JButton("Multiply"));
        p2.add(jbtDiv = new JButton("Divide"));
        // Add panels to the frame
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listeners
        jbtAdd.addActionListener(this);
        jbtSub.addActionListener(this);
        jbtMul.addActionListener(this);
        jbtDiv.addActionListener(this);
        jmiAdd.addActionListener(this);
        jmiSub.addActionListener(this);
        jmiMul.addActionListener(this);
        jmiDiv.addActionListener(this);
        jmiClose.addActionListener(this);
      /** Handle ActionEvent from buttons and menu items */
      public void actionPerformed(ActionEvent e) {
        String actionCommand = e.getActionCommand();
        // Handle button events
        if (e.getSource() instanceof JButton) {
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
        else if (e.getSource() instanceof JMenuItem) {
          // Handle menu item events
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
          else if ("Close".equals(actionCommand))
            System.exit(0);
      /** Calculate and show the result in jtfResult */
      private void calculate(char operator) {
        // Obtain Number 1 and Number 2
        int num1 = (Integer.parseInt(jtfNum1.getText().trim()));
        int num2 = (Integer.parseInt(jtfNum2.getText().trim()));
        int result = 0;
        // Perform selected operation
        switch (operator) {
          case '+': result = num1 + num2;
                    break;
          case '-': result = num1 - num2;
                    break;
          case '*': result = num1 * num2;
                    break;
          case '/': result = num1 / num2;
        // Set result in jtfResult
        jtfResult.setText(String.valueOf(result));
    Original 2 button menu example....
    // Exercise11_8.java: Create multiple windows
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Exercise11_8 extends JFrame implements ActionListener {
      // Declare and create a frame: an instance of MenuDemo
      MenuDemo calcFrame = new MenuDemo();
      // Declare and create a frame: an instance of RadioButtonDemo
      RadioButtonDemo lightsFrame = new RadioButtonDemo();
      // Declare two buttons for displaying frames
      private JButton jbtCalc;
      private JButton jbtLights;
      public static void main(String[] args) {
        Exercise11_8 frame = new Exercise11_8();
        frame.setSize( 400, 70 );
        frame.setTitle("Exercise 11.8: Multiple Windows Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
      public Exercise11_8() {
        // Add buttons to the main frame
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(jbtCalc = new JButton("Simple Calculator"));
        getContentPane().add(jbtLights = new JButton("Traffic Lights"));
        // Register the main frame as listener for the buttons
        jbtCalc.addActionListener(this);
        jbtLights.addActionListener(this);
      public void actionPerformed(ActionEvent e) {
        String arg = e.getActionCommand();
        if (e.getSource() instanceof JButton)
          if ("Simple Calculator".equals(arg)) {
            //show the MenuDemo frame
            jbtCalc.setText("Hide Simple Calculator");
            calcFrame.pack();
            calcFrame.setVisible(true);
          else if ("Hide Simple Calculator".equals(arg)) {
            calcFrame.setVisible(false);
            jbtCalc.setText("Simple Calculator");
          else if ("Traffic Lights".equals(arg)) {
            //show the CheckboxGroup frame
            lightsFrame.pack();
            jbtLights.setText("Hide Traffic Lights");
            lightsFrame.setVisible(true);
          else if ("Hide Traffic Lights".equals(arg)) {
            lightsFrame.setVisible(false);
            jbtLights.setText("Traffic Lights");
         class RadioButtonDemo extends JFrame
      implements ItemListener {
      // Declare radio buttons
      private JRadioButton jrbRed, jrbYellow, jrbGreen;
      // Declare a radio button group
      private ButtonGroup btg = new ButtonGroup();
      // Declare a traffic light display panel
      private Light light;
      /** Main method */
      public static void main(String[] args) {
        RadioButtonDemo frame = new RadioButtonDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(250, 170);
        frame.setVisible(true);
      /** Default constructor */
      public RadioButtonDemo() {
        setTitle("RadioButton Demo");
        // Add traffic light panel to panel p1
        JPanel p1 = new JPanel();
        p1.setSize(200, 200);
        p1.setLayout(new FlowLayout(FlowLayout.CENTER));
        light = new Light();
        light.setSize(40, 90);
        p1.add(light);
        // Put the radio button in Panel p2
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout());
        p2.add(jrbRed = new JRadioButton("Red", true));
        p2.add(jrbYellow = new JRadioButton("Yellow", false));
        p2.add(jrbGreen = new JRadioButton("Green", false));
        // Set keyboard mnemonics
        jrbRed.setMnemonic('R');
        jrbYellow.setMnemonic('Y');
        jrbGreen.setMnemonic('G');
        // Group radio buttons
        btg.add(jrbRed);
        btg.add(jrbYellow);
        btg.add(jrbGreen);
        // Place p1 and p2 in the frame
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listeners for check boxes
        jrbRed.addItemListener(this);
        jrbYellow.addItemListener(this);
        jrbGreen.addItemListener(this);
      /** Handle checkbox events */
      public void itemStateChanged(ItemEvent e) {
        if (jrbRed.isSelected())
          light.turnOnRed(); // Set red light
        if (jrbYellow.isSelected())
          light.turnOnYellow(); // Set yellow light
        if (jrbGreen.isSelected())
          light.turnOnGreen(); // Set green light
    // Three traffic lights shown in a panel
    class Light extends JPanel {
      private boolean red;
      private boolean yellow;
      private boolean green;
      /** Default constructor */
      public Light() {
        turnOnGreen();
      /** Set red light on */
      public void turnOnRed() {
        red = true;
        yellow = false;
        green = false;
        repaint();
      /** Set yellow light on */
      public void turnOnYellow() {
        red = false;
        yellow = true;
        green = false;
        repaint();
      /** Set green light on */
      public void turnOnGreen() {
        red = false;
        yellow = false;
        green = true;
        repaint();
      /** Display lights */
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (red) {
          g.setColor(Color.red);
          g.fillOval(10, 10, 20, 20);
          g.setColor(Color.black);
          g.drawOval(10, 35, 20, 20);
          g.drawOval(10, 60, 20, 20);
          g.drawRect(5, 5, 30, 80);
        else if (yellow) {
          g.setColor(Color.yellow);
          g.fillOval(10, 35, 20, 20);
          g.setColor(Color.black);
          g.drawRect(5, 5, 30, 80);
          g.drawOval(10, 10, 20, 20);
          g.drawOval(10, 60, 20, 20);
        else if (green) {
          g.setColor(Color.green);
          g.fillOval(10, 60, 20, 20);
          g.setColor(Color.black);
          g.drawRect(5, 5, 30, 80);
          g.drawOval(10, 10, 20, 20);
          g.drawOval(10, 35, 20, 20);
        else {
          g.setColor(Color.black);
          g.drawRect(5, 5, 30, 80);
          g.drawOval(10, 10, 20, 20);
          g.drawOval(10, 35, 20, 20);
          g.drawOval(10, 60, 20, 20);
      /** Set preferred size */
      public Dimension getPreferredSize() {
        return new Dimension(40, 90);
    class MenuDemo extends JFrame implements ActionListener {
      // Text fields for Number 1, Number 2, and Result
      private JTextField jtfNum1, jtfNum2, jtfResult;
      // Buttons "Add", "Subtract", "Multiply" and "Divide"
      private JButton jbtAdd, jbtSub, jbtMul, jbtDiv;
      // Menu items "Add", "Subtract", "Multiply","Divide" and "Close"
      private JMenuItem jmiAdd, jmiSub, jmiMul, jmiDiv, jmiClose;
      /** Main method */
      public static void main(String[] args) {
        MenuDemo frame = new MenuDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
      /** Default constructor */
      public MenuDemo() {
        setTitle("Menu Demo");
        // Create menu bar
        JMenuBar jmb = new JMenuBar();
        // Set menu bar to the frame
        setJMenuBar(jmb);
        // Add menu "Operation" to menu bar
        JMenu operationMenu = new JMenu("Operation");
        operationMenu.setMnemonic('O');
        jmb.add(operationMenu);
        // Add menu "Exit" in menu bar
        JMenu exitMenu = new JMenu("Exit");
        exitMenu.setMnemonic('E');
        jmb.add(exitMenu);
        // Add menu items with mnemonics to menu "Operation"
        operationMenu.add(jmiAdd= new JMenuItem("Add", 'A'));
        operationMenu.add(jmiSub = new JMenuItem("Subtract", 'S'));
        operationMenu.add(jmiMul = new JMenuItem("Multiply", 'M'));
        operationMenu.add(jmiDiv = new JMenuItem("Divide", 'D'));
        exitMenu.add(jmiClose = new JMenuItem("Close", 'C'));
        // Set keyboard accelerators
        jmiAdd.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
        jmiSub.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
        jmiMul.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
        jmiDiv.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK));
        // Panel p1 to hold text fields and labels
        JPanel p1 = new JPanel();
        p1.setLayout(new FlowLayout());
        p1.add(new JLabel("Number 1"));
        p1.add(jtfNum1 = new JTextField(3));
        p1.add(new JLabel("Number 2"));
        p1.add(jtfNum2 = new JTextField(3));
        p1.add(new JLabel("Result"));
        p1.add(jtfResult = new JTextField(4));
        jtfResult.setEditable(false);
        // Panel p2 to hold buttons
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout());
        p2.add(jbtAdd = new JButton("Add"));
        p2.add(jbtSub = new JButton("Subtract"));
        p2.add(jbtMul = new JButton("Multiply"));
        p2.add(jbtDiv = new JButton("Divide"));
        // Add panels to the frame
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listeners
        jbtAdd.addActionListener(this);
        jbtSub.addActionListener(this);
        jbtMul.addActionListener(this);
        jbtDiv.addActionListener(this);
        jmiAdd.addActionListener(this);
        jmiSub.addActionListener(this);
        jmiMul.addActionListener(this);
        jmiDiv.addActionListener(this);
        jmiClose.addActionListener(this);
      /** Handle ActionEvent from buttons and menu items */
      public void actionPerformed(ActionEvent e) {
        String actionCommand = e.getActionCommand();
        // Handle button events
        if (e.getSource() instanceof JButton) {
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
        else if (e.getSource() instanceof JMenuItem) {
          // Handle menu item events
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
          else if ("Close".equals(actionCommand))
            System.exit(0);
      /** Calculate and show the result in jtfResult */
      private void calculate(char operator) {
        // Obtain Number 1 and Number 2
        int num1 = (Integer.parseInt(jtfNum1.getText().trim()));
        int num2 = (Integer.parseInt(jtfNum2.getText().trim()));
        int result = 0;
        // Perform selected operation
        switch (operator) {
          case '+': result = num1 + num2;
                    break;
          case '-': result = num1 - num2;
                    break;
          case '*': result = num1 * num2;
                    break;
          case '/': result = num1 / num2;
        // Set result in jtfResult
        jtfResult.setText(String.valueOf(result));
    Mortgage applet code....
    // MortgageApplet.java: Applet for computing mortgage payments
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.TitledBorder;
    public class MortgageApplet extends JApplet
      implements ActionListener {
      // Declare and create text fields for interest rate
      // year, loan amount, monthly payment, and total payment
      private JTextField jtfAnnualInterestRate = new JTextField();
      private JTextField jtfNumOfYears = new JTextField();
      private JTextField jtfLoanAmount = new JTextField();
      private JTextField jtfMonthlyPayment = new JTextField();
      private JTextField jtfTotalPayment = new JTextField();
      // Declare and create a Compute Mortgage button
      private JButton jbtComputeMortgage = new JButton("Compute Mortgage");
      /** Initialize user interface */
      public void init() {
        // Set properties on the text fields
        jtfMonthlyPayment.setEditable(false);
        jtfTotalPayment.setEditable(false);
        // Right align text fields
        jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
        jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
        jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
        jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
        jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
        // Panel p1 to hold labels and text fields
        JPanel p1 = new JPanel();
        p1.setLayout(new GridLayout(5, 2));
        p1.add(new Label("Annual Interest Rate"));
        p1.add(jtfAnnualInterestRate);
        p1.add(new Label("Number of Years"));
        p1.add(jtfNumOfYears);
        p1.add(new Label("Loan Amount"));
        p1.add(jtfLoanAmount);
        p1.add(new Label("Monthly Payment"));
        p1.add(jtfMonthlyPayment);
        p1.add(new Label("Total Payment"));
        p1.add(jtfTotalPayment);
        p1.setBorder(new
          TitledBorder("Enter interest rate, year and loan amount"));
        // Panel p2 to hold the button
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
        p2.add(jbtComputeMortgage);
        // Add the components to the applet
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listener
        jbtComputeMortgage.addActionListener(this);
      /** Handle the "Compute Mortgage" button */
      public void actionPerformed(ActionEvent e) {
        if (e.getSource() == jbtComputeMortgage) {
          // Get values from text fields
          double interest = (Double.valueOf(
            jtfAnnualInterestRate.getText())).doubleValue();
          int year =
            (Integer.valueOf(jtfNumOfYears.getText())).intValue();
          double loan =
            (Double.valueOf(jtfLoanAmount.getText())).doubleValue();
          // Create a mortgage object
          Mortgage m = new Mortgage(interest, year, loan);
          // Display monthly payment and total payment
          jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
          jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
    }

    Does it have to be an applet?
    If you want the same behaviour as in the code with traffic lights, change
    class MortgageApplet extends JApplet implements ActionListener {
    to
    class MortgageApplet extends JFrame implements ActionListener {
    and change
    public void init() {
    to
    public MortgageApplet() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to extract data from multiple tables (always got errors)

    Dear Experts,
    I have a simple mapping to extract data from multiple tables as a source (A, B, C) to a target table (X). Below is the picture:
    (Sources)....(Target)
    A----------------***
    B----------------X
    C----------------***
    Sample Source Data:
    Table A:
    ColA1
    100
    200
    etc
    Table B:
    ColB1 ColB2 ColB3
    10 Y Ten
    20 Y Twenty
    30 Y Thirty
    etc
    Table C:
    ColC1 ColC2
    11
    12
    13
    etc
    Target table (X) should be (just has 1 group INGRP1):
    ColA1 ColB1 ColB3 ColC1
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    Scenarios:
    1. Directly map from A, B, C to X. Unable to map with error message: "API8003: Connection target attribute group is already connected to an incompatible data source. Use a Joiner or Set operator to join the upstream data first before connecting it into this operator."
    2. Map each source to Expression Operator and then map from each Expression to target table. I am able to map all attributes successfully but got error when validating it with message: "VLD-1104: Attributes flowing into TEST.EXPR_SRC.INGRP1 have different data sources."
    How can I achieve the correct mapping for this purpose?
    Use Joiner? I have no key to join the sources
    Use Set? The sources have different number of columns
    Thanks in advance
    Prat

    Thanks Nico,
    I think it will results data like this:
    100 10 Ten 11
    200 20 Twenty 12
    300 30 Thirty 13
    etc
    and not the expected:
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    But it inspired me to solve this by adding key expression in each source table (B & C) to be joined to table A with this formula:
    100+TRUNC(INGRP1.COLB1,-2)
    Regards
    Prat

  • I got error when I export database ORACLE 9i from solaris 9.

    I want to export full database ORACLE 9i from SOLARIS 9 to import full database on ORACLE 9i on windows.
    I set oracle environment and NSL_LANG with command:
    bash-3.00$ export ORACLE_SID=TIS
    bash-3.00$ export NLS_LANG=AMERICAN_AMERICA.TH8TISASCII
    and then run command to export:
    bash-3.00$ exp system/manager@TIS full=y file= /u03/dmp/TISfull.dmp log=/u03/dmp/exp_TIS.log
    I got error message as:
    Export: Release 9.2.0.1.0 - Production on Thu Oct 8 17:57:32 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in TH8TISASCII character set and UTF8 NCHAR character set
    About to export the entire database ...
    . exporting tablespace definitions
    . exporting profiles
    . exporting user definitions
    . exporting roles
    . exporting resource costs
    . exporting rollback segment definitions
    . exporting database links
    . exporting sequence numbers
    . exporting directory aliases
    . exporting context namespaces
    . exporting foreign function library names
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions
    . exporting system procedural objects and actions
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 25153 encountered
    ORA-25153: Temporary Tablespace is Empty
    ORA-06512: at "SYS.DBMS_AW", line 42
    ORA-06512: at "SYS.DBMS_AW", line 105
    ORA-06512: at "SYS.DBMS_AW", line 221
    ORA-06512: at "SYS.DBMS_AW_EXP", line 264
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_AW_EXP.schema_info_exp
    . exporting cluster definitions
    EXP-00056: ORACLE error 25153 encountered
    ORA-25153: Temporary Tablespace is Empty
    ORA-06512: at "SYS.DBMS_LOB", line 424
    ORA-06512: at "SYS.DBMS_METADATA", line 1140
    ORA-06512: at line 1
    EXP-00056: ORACLE error 25153 encountered
    ORA-25153: Temporary Tablespace is Empty
    ORA-06512: at "SYS.DBMS_LOB", line 424
    ORA-06512: at "SYS.DBMS_METADATA", line 1140
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully
    How can I solve this problem?
    Any suggestion?

    #### HOW to solve it.
    ## To check the default temporary tablespace of the database:
    SQL> select property_name, property_value from database_properties;
    ## check DEFAULT_TEMP_TABLESPACE, if it use wrong temporary tablespace, run:
    SQL> alter database default temporary tablespace temp;
    ## check user with temporary tablespace, run command:
    SQL> select username, temporary_tablespace, account_status from dba_users;
    ## change temporary tablespace:
    SQL> create temporary tablespace temp1 tempfile '/data/u01/app/oracle/oradata/TIS/temp_b.dbf' size 100m;
    SQL> alter database default temporary tablespace temp1;
    SQL> drop tablespace temp including contents and datafiles;
    SQL> create temporary tablespace temp tempfile '/data/u01/app/oracle/oradata/TIS/temp01.dbf' size 100m autoextend off extent management local uniform size 1m;
    SQL> alter database default temporary tablespace temp;
    SQL> drop tablespace temp1 including contents and datafiles;
    Thanks

  • I just got a nano 7th generation but came in  chinese language and don't understand

    Hi
    I new at this, I just got the nano 7th generation. Took it out of the package and discover that is in chinese language and don't understand and don't know which one of the setting in the one for changing the language.
    Can anyone help one
    Annie

    Hey there amontalvo,
    It sounds like your default language needs to be changed on your iPod Nano 7th gen. These instructions should help you get that reset, from the following article:
    iPod: Changing the display language
    http://support.apple.com/kb/HT1824
    Reset your iPod—Depending on how much you've used your iPod since selecting the language, simply resetting your iPod may cause it to forget the current language setting, enabling you to select a new one. See How to reset iPod for instructions.
    Note: When you reset your iPod, all your music and data files are saved, though you may need to reset some customized settings.
    Update your iPod software—If you haven't updated your iPod software recently, use the latest version of iTunes and update the iPod software.
    Go to the main menu—Disconnect your iPod from your computer, then press the Menu button until the menu title says "iPod," regardless of the language displayed. This means you are at the main menu.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

Maybe you are looking for

  • Excise invoice with reference to proforma invooice

    Hi I need to generate a excise invoice After consignment fill-up and delivery i raised proforma invoice and now with ref to prof invoice can i able to create excise invoice. regards rithvika

  • Case insensitive in indexOf

    hi all, i want to use the indexOf method without case sensitive. any one plz help me. thanks in advance sathaa

  • Transform info box in PS CC

    I am running PS CC.  How do i get rid of the little black box with the x and y coordinates that comes up every time I transform an object?

  • IOS 5.1.1 crashes all the time...

    Perhaps I wasn't clear before, I'll try to explain better this time... I soent close to $1000 buying an iPad 1, 64 GB 3g version when it first came out. Everything was fine until I ran the official Apple iOS 5 update, at which point the iPad became b

  • Play for sure / subscription services support for MuVo v

    When or rather can we expect a firmware update that will allow MuVo V00 to accept DMR (DRM) subscription services? It currently doesn't support these services. Message Edited by reyn3000 on -28-20062:2 PM