Let's see who can help with this applet

Hello. I am new in Java and confused with this assignment.
I have to write an applet for a store that sells 8 products
whose retails prices are Product 1 - $2.98, Product 2 - $4.50, Product 3 - $9.98, Product 4 - $ 4.49, Product 5 - $ 6.87,
Product 6 � $ 12.37, Product 7 - $ 14.30 and Product 8 - $ 11.40.
The applet: 1) Has an intro message to a store named for you, where you describe what products they have, 2) Reads a series of pairs of numbers: Product Number and Quantity Number.
Use a switch structure to determine the retail prices for each product. Use "TextField" to obtain the product number from the user. Use a �sentinel controlled� loop to determine when the program should stop looping to display the final result (I used number -1 as sentinel). Display the total value of all products sold.
This is the program I wrote:
//java core packages
import java.awt.*;
import java.awt.event.*;
import java.text.NumberFormat;
import java.util.Locale;
// Java extension packages
import javax.swing.*;
public class MYSHOP extends JApplet implements ActionListener {
// GUI componentes
JLabel productNumLabel, quantityNumLabel;
JTextField productNumField, quantityNumField;
// variables
double subtotal = 0;
double total = 0;
public void init()
// display intro message
JOptionPane.showMessageDialog( null, "Welcome toablabla.\nWe
offer you blablabla\nClick OK to start shoping",
"Company information", JOptionPane.PLAIN_MESSAGE );
// obtain content pane and set its layout to FlowLayout
Container container = getContentPane();
container.setLayout( new FlowLayout() );
// create productNumLabel, productNumField and attach them to
// content pane
productNumLabel = new JLabel( "Enter Product Number (-1 to
quit):" );
productNumField = new JTextField( 4 );
productNumField.addActionListener( this );
container.add( productNumLabel );
container.add( productNumField );
// create productNumLabel, productNumField and attach them to
// content pane
quantityNumLabel = new JLabel("Enter Quantity:");
quantityNumField = new JTextField( 4 );
quantityNumField.addActionListener( this );
container.add( quantityNumLabel );
container.add( quantityNumField );
} // end method init
public void actionPerformed( ActionEvent actionEvent )
int index = Integer.parseInt( productNumField.getText() );
int ammount = 0;
while ( index != -1 )
NumberFormat moneyFormat =
NumberFormat.getCurrencyInstance( Locale.US );
if( actionEvent == quantityNumField.getText() )
ammount = Integer.parseInt( quantityNumField.getText() );
switch (index)
case 1:
subtotal += ( 2.98 * ammount );
break;
case 2:
subtotal += ( 4.5 * ammount );
break;
case 3:
subtotal += ( 9.98 * ammount );
break;
case 4:
subtotal += ( 4.49 * ammount );
break;
case 5:
subtotal += ( 6.87 * ammount );
break;
case 6:
subtotal += ( 12.37 * ammount );
break;
case 7:
subtotal += ( 14.30 * ammount );
break;
case 8:
subtotal += ( 11.40 * ammount );
break;
case -1:showStatus( "The Total is: " + subtotal );
System.exit(0);
break;
default:
JOptionPane.showMessageDialog( null,"There is no
such product", "ERROR",
JOptionPane.ERROR_MESSAGE);
} // end switch structure
} // end while structure
productNumField.setText(""); // clear productNum field
quantityNumField.setText(""); // clear quantityNum field
} // end method actionPerformed
} // end class MYSHOP
When I try to compile it, the error I get is "incomparable types: java.awt.event.ActionEvent and java.lang.String", in the line:
if( actionEvent == quantityNumField.getText() )
The error pointer points to "==" in that line
What should I write in that line instead?
Also, if someone realizes that some part of the code is in the wrong place, please tell me.
Thanks in advance.

Instead of
if( actionEvent == quantityNumField.getText() ) I think you want
if( actionEvent.getSource() == quantityNumField )HTH,
Radish21

Similar Messages

  • I need another person Who Can help with this iphone it will not restore on will not completely turn on

    i can't turn on the phone or even restore the phone completely it will not turn on at all !!

    iOS: How to backup - http://support.apple.com/kb/HT1766
    iOS: Unable to update or restore - http://support.apple.com/kb/HT1808

  • Who can help with download  of Acrobat XI Pro to Mac OS X 10.5.8?

    Who can help with download of Acrobat XI Pro to Mac OS X 10.5.8.

    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Anybody can help with this SQL?

    The table is simple, only 2 columns:
    create table personpay(
    id integer primary key,
    pay number(8,2) not null);
    So the original talbe looks like this:
    ID PAY
    1 800
    2 400
    3 1200
    4 500
    5 600
    6 1900
    The requirement is to use one single query(no pl/sql) to show something lile the following, in other words, for each ID, the pay is the sum of all before itself and itself. So the query result looks like this:
    ID PAY
    1 800
    2 1200
    3 2400
    4 2900
    5 3500
    6 5400
    Again, just use one sql. No pl/sql. Anybody can help with this? I really appreciate that.
    thanks,

    Eh, people are so "analytically minded" that can't even notice a simple join?
    Counting Ordered Rows
    Let’s start with a basic counting problem. Suppose we are given a list of integers, for example:
    x
    2
    3
    4
    6
    9
    and want to enumerate all of them sequentially like this:
    x      #
    2      1
    3      2
    4      3
    6      4
    9      5
    Enumerating rows in the increasing order is the same as counting how many rows precede a given row.
    SQL enjoys success unparalleled by any rival query language. Not the last reason for such popularity might be credited to its proximity to English . Let examine the informal idea
    Enumerating rows in increasing order is counting how many rows precede a given row.
    carefully. Perhaps the most important is that we referred to the rows in the source table twice: first, to a given row, second, to a preceding row. Therefore, we need to join our number list with itself (fig 1.1).
    Cartesian Product
    Surprisingly, not many basic SQL tutorials, which are so abundant on the web today, mention Cartesian product. Cartesian product is a join operator with no join condition
    select A.*, B.* from A, B
    Figure 1.1: Cartesian product of the set A = {2,3,4,6,9} by itself. Counting all the elements x that are no greater than y produces the sequence number of y in the set A.
    Carrying over this idea into formal SQL query is straightforward. As it is our first query in this book, let’s do it step by step. The Cartesian product itself is
    select t.x x, tt.x y
    from T t, T tt
    Next, the triangle area below the main diagonal is
    select t.x x, tt.x y
    from T t, T tt
    where tt.x <= t.x
    Finally, we need only one column – t.x – which we group the previous result by and count
    select t.x, count(*) seqNum
    from T t, T tt
    where tt.x <= t.x
    group by t.x
    What if we modify the problem slightly and ask for a list of pairs where each number is coupled with its predecessor?
    x      predecessor
    2      
    3      2
    4      3
    6      4
    9      6
    Let me provide a typical mathematician’s answer, first -- it is remarkable in a certain way. Given that we already know how to number list elements successively, it might be tempted to reduce the current problem to the previous one:
    Enumerate all the numbers in the increasing order and match each sequence number seq# with predecessor seq#-1. Next!
    This attitude is, undoubtedly, the most economical way of thinking, although not necessarily producing the most efficient SQL. Therefore, let’s revisit our original approach, as illustrated on fig 1.2.
    Figure 1.2: Cartesian product of the set A = {2,3,4,6,9} by itself. The predecessor of y is the maximal number in a set of x that are less than y. There is no predecessor for y = 2.
    This translates into the following SQL query
    select t.x, max(tt.x) predecessor
    from T t, T tt
    where tt.x < t.x
    group by t.x
    Both solutions are expressed in standard SQL leveraging join and grouping with aggregation. Alternatively, instead of joining and grouping why don’t we calculate the count or max just in place as a correlated scalar subquery:
    select t.x,
    (select count(*) from T tt where tt.x <= t.x) seq#
    from T t
    group by t.x
    The subquery always returns a single value; this is why it is called scalar. The tt.x <= t.x predicate connects it to the outer query; this is why it is called correlated. Arguably, leveraging correlated scalar subqueries is one the most intuitive techniques to write SQL queries.
    How about counting rows that are not necessarily distinct? This is where our method breaks. It is challenging to distinguish duplicate rows by purely logical means, so that various less “pure” counting methods were devised. They all, however, require extending the SQL syntactically, which was the beginning of slipping along the ever increasing language complexity slope.
    Here is how analytic SQL extension counts rows
    select x, rank() over(order by x) seq# from T; -- first problem
    select x, lag() over(order by x) seq# from T; -- second problem
    Many people suggest that it’s not only more efficient, but more intuitive. The idea that “analytics rocks” can be challenged in many ways. The syntactic clarity has its cost: SQL programmer has to remember (or, at least, lookup) the list of analytic functions. The performance argument is not evident, since non-analytical queries are simpler construction from optimizer perspective. A shorter list of physical execution operators implies fewer query transformation rules, and less dramatic combinatorial explosion of the optimizer search space.
    It might even be argued that the syntax could be better. The partition by and order by clauses have similar functionality to the group by and order by clauses in the main query block. Yet one name was reused, and the other had been chosen to have a new name. Unlike other scalar expressions, which can be placed anywhere in SQL query where scalar values are accepted, the analytics clause lives in the scope of the select clause only. I have never been able to suppress an impression that analytic extension could be designed in more natural way.

  • I have a report from WhatisHang which (in theory) tells my why my firefox constantly hangs up. But I need someone who can help figure this out.

    I hope this section will work, i couldnt find a place for Hang ups, and this problem doesnt usually cause a full crash, which is why it was hard to figure it out.
    I finally used the program WhatisHang to try to get an idea of what is causing the seemingly random hanging, but have been unable to find anyone who can help me with it.
    I have posted the Troubleshooting Information, though i dont think it would be of much help.
    I have the report available but dont know where i can post it.

    I must admit I seem possibly to be suffering from hangs also, although as I am often not in a hurry when using firefox on this machine it has little impact. I am using a legacy computer and tend to blame this on the computer or maybe background tasks such as from security software or indexing.
    '''Do you still get the hangs in safe mode with all''' (or maybe all but one essential plugin if you think a plugin is involved in the hangs) '''plugins disabled ?
    Have you tried to rule out
    * background tasks are the problem, <br/>(at least monitor what else is running using Task Manager or sysinternals process explorer)
    * [[is my firefox problem a result of malware|malware]]. <br/>( consider full system scans with multiple tools/software)
    * any other interacting programs or plugins <br/>(some may not be listed in firefox, you may need to check / uninstall from the OS {Windows Control Panel})
    **it may also be an idea to check hangs still occur when WhatIsHangs is not in use.
    * have you tried logging the cc & gc times in the error console, <br/>(if for instance you see times in 1000s of milliseconds appearing you may have then identified one reason for firefox being unresponsive, even if the cause is not yet identified. - a symptom the memshrink firefox developers will no doubt be eager to investigate)
    * if you can get hangs in safe mode, on at least the Aurora channel releases I suggest you immediately go ahead and file a bug yourself. (I will try to find time if not today then next weekend to look more closely at my own system to see if it is showing hangs in firefox use)
    ** ideally try with all default preferences
    ** As you have changed preferences, I suggest you include as a attachment in the bug your list of user modified preferences (use ''about:support'' or Troubleshooting Information option)
    ** State what security software is in use, it could be an important factor.<br/> (I imagine the majority of users have security software, or if not have security vulnerabilities and potentially an undetected malware problem)
    I will try to find and download a copy of WhatIsHang, see if it works on my system and what results it then shows.
    I realise I have not said anything terribly helpful I solving your problem, but I suspect you are not alone in having hangs, if you are able to spare the time to investigate and report I am sure it will help others.
    Firefox has had a few problems recently that would have been solved sooner if they were investigated when first reported, but unfortunatly an advantage of firefox is how easy it is to customise, but the downside is differentiating between a firefox fault and customisation problems.

  • Let's see who can figure this out =]

    Okay,
    I have a broken ipod 4G 20GB model. It displays a sick icon. It will not go into diagnostics mode. It is not seen by itunes or my PC (windows xp OS). When it is plugged in the charge icon shows up, but it does not move.
    So basically I can't do anything to it with my computer or with the buttons on the ipod, so I think I will have to take it apart to fix it, as I'm not going to send it back as the warranty is over.
    I don't mind erasing everything on it, and I would if I knew how to, and I will try just about anything so I can make it atleast an external hard drive.
    If anyone knows what I should do once I take it apart, what part is most likely wrong with it, if they know some way to fix it, or have any questions... please post =].
    Thanks for your help.

    I have fixed it!!!
    I was in the middle of prying open the case and the Ipod flew out of my hands and landed on the concrete floor, and then I looked at it and it had turned on. The hard drive was humming but I turned it on and off and it fixed.
    If your ipod is broken just smash it on the floor... Apple add that onto your repair checks =D. (I'm not responsible if it doesn't work for you)
    Thanks for all of your replies (sarcasm ^^)

  • Aprimo and InDesign integration... Curious if any 3rd party programs can help with this. Thanks!

    We were promised that Aprimo played nicely with Creative Suite, although now that we're getting our hands dirty, we're finding this is not the case, and our Aprimo contacts haven't been much help. Has anyone out there found a way to make this work? Thank you for any notes & recommendations!

    Aprimo’s Marketing Resource Management (MRM) solution has Brand Asset Management functionality.
    A full enterprise digital asset management solution like North Plains TeleScope can understand creative tool work flow, allowing users to work with complex, multi-asset documents such as InDesign without needing to manage each asset individually.
    A solution involving a strong Aprimo-TeleScope integration off ers companies the best of both worlds. It would impart great value to all who need Enterprise Digital Asset Management and also want to manage their campaigns and marketing processes more eff ectively.
    We at Capgemini have a Center of Excellence for Integrated Marketing Management where in we have expertise in building Aprimo's MRM as well as North Plains TeleScope solutions. We have been collaborating with Aprimo as well as North Plains for varions engagements to work as a Consultant / System Integrator for our customers across geographies - especially North America.
    We can provide the above mentioned solution if needed.

  • I wish to speak to adviser who can help with my problem , not start a discussion about it

    I wish to speak to an advisor about my problem nor start a discussion about it

    If it is to do with your PSE9 error though be aware you will probably need to pay for support (both installation support and complimentary incidents for PSE are current version only), defects covered only for current (v12) and previous (v11) versions. :
    Unlimited installation support for the current version of the software product, including trials.
    Unlimited installation support for the previous version of the software product. (Not available for Adobe Photoshop Elements and Adobe Premiere Elements.)
    For two versions back, installation support is provided for 90 days after the current version has been released. For example, installation support for CS4 is available up to 90 days after the release of CS6. (Not available for Adobe Photoshop Elements and Adobe Premiere Elements.)
    How-to and product usage support for the current shipping version. This type of support is also provided for the previous version for 90 days after a new full version has been released.
    Product defect support for the current and previous version of the software product, including trials.
    A limited number of complimentary technical support incidents. Technical support incidents cover basic "how-to" questions and troubleshooting unexpected behavior related to documented features. Your complimentary incidents are available for 90 days after you contact support for the first time:
    <snipped> ...
    Photoshop Elements and Adobe Premiere Elements: two complimentary  incidents, current version only
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Purchased 3 subscriptions for Adobe Acrobat On colleague never received her link . . who can help me this site just sends you around and around

    Please see above, I can't seem to find any support for the above issue.  We just need a link resent to us for our recent purchase.

    What link do you need?  Subscriptions are activated by signing-in with the appropriate Adobe ID.
    You can download the trial from http://www.adobe.com/products/acrobatpro.html

  • Any FRENCH PEOPLE here who can help with: E71 + Fr...

    Can anyone advise me how to set up my phone
    so i can use it to phone via the freebox?
    The free.fr website does not provide much info,
    or maybe it's just that my French is not good enough.
    Appreciate the help...
    A dutch in France.

    Thanks for yr reply.
    I should have posted this i guess,
    but meantime i found some instructions:
    it's for the E61, but works the same for the e71:
    http://www.universnokia.com/?p=3
    cheers
    egon

  • Who can help solve this XML/Servlet mystery?

    Hi,
    I'm developing a servlet that accepts an HTTP request, contacts a database, processes the request and return an XML document back to the browser. The XML document returned is dependent on which selection a user makes.
    The problem is that on first request, say user selects "choice one", the correct XML document is returned. However, when the browser's back button is used to go back and make the same choice as previous(ie "choice one"), Explorer 4.5 displays an empty page while netscape 4.5 return a document contains no data error.
    I used oracle xmlclassgenerator to generate the classes that create the XML document to be returned. The problem certainly lies in the method of my servlet that uses these classes to generate the XML document because when I replace the whole method with println statement every thing works fine(but of course without the XML document).
    The content of the method is as follows.
    ACCOUNT acc = new ACCOUNT(id);
    //Create a child and add child to root node
    NUM_OF_RESIDENTS nr = new NUM_OF_RESIDENTS(num);
    acc.addNode(nr);
    //Create another child and add to root node
    FIXED_COST fc = new FIXED_COST();
    ELECTRICITY el = new ELECTRICITY(elec);
    GAS g = new GAS(gas);
    WASH_MACHINE wm = new WASH_MACHINE(wash);
    WATER wat = new WATER(water);
    OTHER oth = new OTHER(other);
    fc.addNode(el);
    fc.addNode(g);
    fc.addNode(wm);
    fc.addNode(wat);
    fc.addNode(oth);
    //finally add to root node
    acc.addNode(fc);
    //Create another child
    TELEPHONE tl = new TELEPHONE();
    SUBSCRIPTION sub = new SUBSCRIPTION(tel);
    COST_PER_TICK cpt = new COST_PER_TICK(tick);
    tl.addNode(sub);
    tl.addNode(cpt);
    acc.addNode(tl);
    //Create another child
    // PREVIOUS_ACCOUNT pacc = new PREVIOUS_ACCOUNT();
    for(int i=0; i<previous_details.size(); i++){
    //Create another child
    PREVIOUS_ACCOUNT pacc = new PREVIOUS_ACCOUNT();
    PreviousDetails pd = (PreviousDetails)previous_details.elementAt(i);
    String name = pd.getName();
    String credit = pd.getCredit();
    String debit = pd.getDebit();
    NAME n = new NAME(name);
    LAST_CREDIT lc = new LAST_CREDIT(credit);
    LAST_DEBIT ld = new LAST_DEBIT(debit);
    pacc.addNode(n);
    pacc.addNode(lc);
    pacc.addNode(ld);
    acc.addNode(pacc);
    for(int i=0; i<acc_dates.size(); i++){
    String str = (String)acc_dates.elementAt(i);
    ACCOUNT_DATE ad = new ACCOUNT_DATE(str);
    acc.addNode(ad);
    acc.validateContent();
    ByteArrayOutputStream out1 = new ByteArrayOutputStream(1024);
    acc.print(out1);
    res.setContentType("text/plain");
    ServletOutputStream os = res.getOutputStream();
    PrintWriter out = new PrintWriter(os);
    out.println(out1.toString());
    out.close();
    catch(Exception e){}
    Am I doing somthing wrong here?
    Thanks.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    If you paste your code that's in the servlet into a file with a static main() method, and if you wrap the code with a for loop in Java that makes it execute 3 times in a row, does it work properly each of the the 3 times in this scenario?<HR></BLOCKQUOTE>
    I have done as you requested. For your convenience I have pasted both the code and its output below.
    import oracle.xml.classgen.*;
    import oracle.xml.parser.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import java.math.*;
    public class CreateTest{
    static String id = "10212";
    public static void main (String args[]){
    for(int i=0; i<3; i++){
    System.out.println("Request started!");
    testLoop();
    static void testLoop(){
    try{
    System.out.println("Start DB contact");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:thin:@my_ip:sid","username", "passwd");
    ResultSet rset;
    Vector acc_dates = new Vector();
    Vector previous_details = new Vector();
    String elec = null;
    String gas = null;
    String wash = null;
    String water = null;
    String other = null;
    String tel = null;
    String tick = null;
    String num = null;
    Statement stmt = conn.createStatement();
    rset = stmt.executeQuery("select NUM_OF_RESIDENTS from MEMBER WHERE ID="+id);
    while(rset.next()){
    num = String.valueOf(rset.getInt(1));
    rset = stmt.executeQuery("select ELECTRICITY,GAS,WASH_MACHINE,WATER,OTHER from FIXED_COST where ID="+id);
    while(rset.next()){
    elec = String.valueOf(rset.getFloat(1));
    gas = String.valueOf(rset.getFloat(2));
    wash = String.valueOf(rset.getFloat(3));
    water = String.valueOf(rset.getFloat(4));
    other = String.valueOf(rset.getFloat(5));
    rset = stmt.executeQuery("select SUBSCRIPTION,COST_PER_TICK from TELEPHONE WHERE id="+id);
    while(rset.next()){
    tel = String.valueOf(rset.getFloat(1));
    tick = String.valueOf(rset.getFloat(2));
    rset = stmt.executeQuery("select NICK_NAME, CREDIT, DEBIT from PREVIOUS_ACCOUNT WHERE LAST_ACCOUNT='yes' AND id="+id);
    while(rset.next()){
    String name = rset.getString(1);
    String credit = String.valueOf(rset.getFloat(2));
    String debit = String.valueOf(rset.getFloat(3));
    PreviousDetails pd = new PreviousDetails(name,credit,debit);
    previous_details.addElement(pd);
    rset = stmt.executeQuery("select ACCOUNT_DATE from ACCOUNT_RESULT WHERE ID="+id);
    while(rset.next()){
    acc_dates.addElement(rset.getString(1));
    rset.close();
    stmt.close();
    conn.close();
    System.out.println("End DB contact");
    generateXMLDocument(num,elec,gas,wash,water,other,tel,tick,previous_details,acc_dates);
    catch(Exception e){e.printStackTrace();}
    public static void generateXMLDocument(String num, String elec, String gas, String wash, String water, String other, String tel, String tick, Vector previous_details, Vector acc_dates){
    try{
    //Create the document root node
    ACCOUNT acc = new ACCOUNT(id);
    //Create a child and add child to root node
    NUM_OF_RESIDENTS nr = new NUM_OF_RESIDENTS(num);
    acc.addNode(nr);
    //Create another child and add to root node
    FIXED_COST fc = new FIXED_COST();
    ELECTRICITY el = new ELECTRICITY(elec);
    GAS g = new GAS(gas);
    WASH_MACHINE wm = new WASH_MACHINE(wash);
    WATER wat = new WATER(water);
    OTHER oth = new OTHER(other);
    fc.addNode(el);
    fc.addNode(g);
    fc.addNode(wm);
    fc.addNode(wat);
    fc.addNode(oth);
    //finally add to root node
    acc.addNode(fc);
    //Create another child
    TELEPHONE tl = new TELEPHONE();
    SUBSCRIPTION sub = new SUBSCRIPTION(tel);
    COST_PER_TICK cpt = new COST_PER_TICK(tick);
    tl.addNode(sub);
    tl.addNode(cpt);
    acc.addNode(tl);
    //Create another child
    // PREVIOUS_ACCOUNT pacc = new PREVIOUS_ACCOUNT();
    for(int i=0; i<previous_details.size(); i++){
    //Create another child
    PREVIOUS_ACCOUNT pacc = new PREVIOUS_ACCOUNT();
    PreviousDetails pd = (Previou sDetails)previous_details.elementAt(i);
    String name = pd.getName();
    String credit = pd.getCredit();
    String debit = pd.getDebit();
    NAME n = new NAME(name);
    LAST_CREDIT lc = new LAST_CREDIT(credit);
    LAST_DEBIT ld = new LAST_DEBIT(debit);
    pacc.addNode(n);
    pacc.addNode(lc);
    pacc.addNode(ld);
    acc.addNode(pacc);
    for(int i=0; i<acc_dates.size(); i++){
    String str = (String)acc_dates.elementAt(i);
    ACCOUNT_DATE ad = new ACCOUNT_DATE(str);
    acc.addNode(ad);
    acc.validateContent();
    ByteArrayOutputStream out1 = new ByteArrayOutputStream(1024);
    acc.print(out1);
    System.out.println("The result is:");
    System.out.println(out1.toString());
    catch(Exception e){}
    The output is:
    Request started!
    Start DB contact
    End DB contact
    The result is:
    <!DOCTYPE ACCOUNT SYSTEM "file:/home/httpd/html/tydex/dtd/ACCOUNT_dtd.txt">
    <ACCOUNT ID="10212">
    <NUM_OF_RESIDENTS>3</NUM_OF_RESIDENTS>
    <FIXED_COST>
    <ELECTRICITY>0.0</ELECTRICITY>
    <GAS>0.0</GAS>
    <WASH_MACHINE>0.0</WASH_MACHINE>
    <WATER>0.0</WATER>
    <OTHER>0.0</OTHER>
    </FIXED_COST>
    <TELEPHONE>
    <SUBSCRIPTION>0.0</SUBSCRIPTION>
    <COST_PER_TICK>0.0</COST_PER_TICK>
    </TELEPHONE>
    <PREVIOUS_ACCOUNT>
    <NAME>dsffd</NAME>
    <LAST_CREDIT>0.0</LAST_CREDIT>
    <LAST_DEBIT>0.0</LAST_DEBIT>
    </PREVIOUS_ACCOUNT>
    <PREVIOUS_ACCOUNT>
    <NAME>dsfd</NAME>
    <LAST_CREDIT>0.0</LAST_CREDIT>
    <LAST_DEBIT>0.0</LAST_DEBIT>
    </PREVIOUS_ACCOUNT>
    <PREVIOUS_ACCOUNT>
    <NAME>dsfdfs</NAME>
    <LAST_CREDIT>0.0</LAST_CREDIT>
    <LAST_DEBIT>0.0</LAST_DEBIT>
    </PREVIOUS_ACCOUNT>
    </ACCOUNT>
    Request started!
    Start DB contact
    End DB contact
    Request started!
    Start DB contact
    End DB contact
    Thanks.
    null

  • Oh boy, nothing so far has worked, who can help on this one

    Here is the deal...
    Apple logo would not dissapear from the screen of my 4 year old ipod (dockstation version, 15GB),
    I reformatted (FAT32 as per this forum) and restored my ipod in itunes. When this was done (multiple times now) I was asked to connect my ipod to the power supply.
    Doing that right now but the 'Disk Mode' and 'OK to disconnect' screen simply continue to show on the display and the battery icon is charging continously.
    This has been for about 2 hours now..
    Oh yeah, never had a problem before and I am a mild/medium user..
    Any suggestions appreciated as I do not have the money to buy a new Ipod or go to the Apple fixers..
      Windows XP  

    thanks for your comments but I have tried all of that.
    Apple logo appears and I can even get fase 1 of the restore program in itunes to run.
    After part1 of the restore program I am asked to unplug the ipod from itunes and hook it up to power. Then supposedly fase 2 or restoring is tarting but unfortunately nothing happens..
    I just listened closely and the ipod makes ticking noises when the apple logo is showing..
    Is that bad?

  • Is there anyone who can help with Pages 5 templates?

    I'm finding it frustrating to the point of despair using the newsletter template in Pages 5.  I have turned to you, at this point, because the application has simply stopped working -- cursor clicks inside text/image boxes, moving text boxes and images, etc.  Things are stuck.
    Certain Pages 5 format features work well for the template, but there are no varied pre-formatted page-templates... I cannot cut/paste from previous template work done in Pages 09... and -- most frustrating of all -- I discover that the time spent on formatting, arranging images, cutting/pasting, etc, etc often is obliterated by software that willy-nilly changes my work.  I just quit when an image I had placed at the top of the page became stuck overlaying text on the right side center of the page.  And I do know how to use the Group / Ungroup / Lock feature!
    Please: any advice for tutorial or...?  Thank you! Nate

    Pages 5 is what it is, a lobotomised version of Pages '09.
    Use Pages '09 which should be in your Applications/iWork folder.
    Peter

  • Plz help with this applet problem

    i made this player in jmf... and i tried to play file over http in it..
    player runs as applet in a jsp page.
    the prob is i was using .class file for the applet..but it wouldnt open a remote url coz applets run in sandbox mode...
    so i signed the applet..which caused it to end up in a jar..
    now the jar is perfectly playing remote urls..BUT
    it gives NoClassDefFound Error for ControllerListener class
    so
    1) with .class files it runs in all computers, but opens only files present on same servrer
    2) with .jar file it runs only on computers with jmf 2.1.1 installed, others giv the above error
    any ideas y this is so?
    and how do i add the whole javax.media package to teh jar if need be?
    i used:
    jar cvf test.jar PlayerApplet.java
    but how does ones add javax.media package?
    thanks

    Sorry. In that page I have to insert a CODE. I think I can get the code debugging the applet. Not the source code, a CODE that is in a class called Training.class
    <applet archive="http://www.mod-x.co.uk/mod_x_LeV_2/M_LeVeL3_od/7nf73b.jar" code="Training.class" width=300 height=50></applet>
    Cheers :D
    EDIT: Look, more logs in the java console when I leave the page:
    basic: New window ID: 0
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@ab835a
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@db3331, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@db3331
    basic: Current classloader cache size: 1
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    basic: Joined applet thread ...
    Cheers :D
    Message was edited by:
    Tiger

  • Does anybody know how to get help with this one?

    Hello there!  
    I wanted to get an advice on how to get in touch with the appropriate person at BT that could help with my situation.
    I have tried telephone help, complaints by email and unfortunately still waiting for somebody from the customer services to help me out.
    I have recently moved home.  I contacted BT on 26th June to organise the line transfer to the new address. The date was set for 18th July. I also ordered line rental saver and paid for it over the phone. All went smooth, telephone and broadband was working fine at the new place, but on the 23rd July I was sent an email that "BT is sorry that I am leaving". 
    I thought it was a mistake, but the lady in the on-line chat said somebody stopped my service. Later she rang and left a message saying that I must have requested to move to another provider. Did not manage to speak to her again, but phoned the help line this time.
    There a gentleman was trying to convince me that I called BT and cancelled my service on the 18th July and to him I was not a BT customer anymore. The truth is that I did not request to stop my service, anyway - why would I do that after paying for a year in advance. This has no logic, but because computer says so then he thinks I did it.
    He also added that my account is a 'mess'. He then promised that somebody would get in touch to sort it out as my line rental was gone and my phone and internet could go off any minute.
    I did not get any help. After that I wrote to them  3 email complaints to request assistance. They called and aknowledge they will help, but 3 weeks down the line nothing was done to explain the situation. Left the messages to the person from email complaints to ring me or email me -never happened.
    Last week I got 2 emails welcoming me to BT and outlining the call plans that were diferent from each other and the one I agreed to on the 25th June. When I called help line 2 days ago a lady confirmed on which one I am on, but could not sort out the most annoying thing - the 'final' bill. 
    I was sent a bill for over 200 pounds due to premature termination of phone and broadband service , which I never ordered. They already took the money this week. My line saver is gone as well. So I am 360 pounds short. I aslo have no access to myBT to monitor my phone activity or make orders.They also did not send any confrimation of the call plan I am currently on.
    It is a very annoying situation, because somebody at BT made an error and I am unable to get to anybody that could help. Everytime you call the help line you speak to somebody else and despite me thinking the email complaints would be the way forward they are not. Would appreciate some advice on how to tackle these issues: false accusations from them, inappropriate billing, problem with myBT.
    Thanks Lukasz

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

Maybe you are looking for

  • Retractable firewire cables ...

    Hi all, Thinking I'd treat myself to a Christmas cable-cleanup, I purchased some Iogear ReelQuick Firewire 6pin-to-6pin retractable cables. Problem is, once I got them and read the fine print, I saw they have a 5V maximum voltage supported, so they w

  • Daisy Chaining Firewire HDs

    I now have a Lacie D2 1TB hooked up to my sole Firewire 800 input, If I get another identical Lacie, would it be OK to use the 1st one for Timemachine as I do now, and hook another to it for data? As of now I have the Lacie patitioned into 3 parts...

  • SDM Config in Netweaver Developer Studio 2.0.5

    Hi,   We have EP60 SP2 running on J2EE 6.20 . We installed Netweaver developer studio 2.0.5 and we created and web dynpro application successfully with the tutorial and tried to deploy it to the J2EE engine.   Deployment process expects J2EE engine a

  • Xacute SPC/SQC Analysis Action Output XML

    I am using 11.5 and am going to implement some BLS's with the SPC/SQC Analysis action. My question is how do I work with that XML Output from the Action. I need to look at one of the "Rowset" pieces at a time with an Iterator or Sort and Filter actio

  • Pages Changes expands or contracts after saving

    I have a document in Pages and I selected a blank page as my format 2 column. I have written a 97 page book My Life Story including many pictures. When I save the document and open it later I find that pictures have shifted positions and the text may