Problem with preader program

Posted in the wrong area. Moved to webOS Software.
I am a Volunteer here, not employed by HP.
You too can become an HP Expert! Details HERE!
If my post has helped you, click the Kudos Thumbs up!
If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

Ok I got the solution. A friend helped me out. I had to make a few minor changes. Now the program looks like:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.DecimalFormat;
public class DogsHumanAge extends JApplet
implements ActionListener
JTextField inputDogYears, displayHumanYears;
public void init()
JLabel labelDogYears = new JLabel("Enter the dog's age in dog years:",
SwingConstants.RIGHT);
inputDogYears = new JTextField(5);
JLabel labelHumanYears = new JLabel("Human years = ", SwingConstants.RIGHT);
displayHumanYears = new JTextField(5);
displayHumanYears.setEditable(false);
JButton go = new JButton("Compute age");
go.addActionListener(this);
Container c = getContentPane();
c.setBackground(Color.white);
JPanel p = new JPanel();
p.setLayout(new GridLayout(3, 2, 5, 5));
p.add(labelDogYears);
p.add(inputDogYears);
p.add(labelHumanYears);
p.add(displayHumanYears);
c.add(p, BorderLayout.CENTER);
c.add(go, BorderLayout.SOUTH);
public void actionPerformed(ActionEvent e)
int dogYears = Integer.parseInt(inputDogYears.getText());
double humanYears = calculateHumanYears(dogYears);
DecimalFormat df = new DecimalFormat("00.0");
displayHumanYears.setText(df.format(humanYears));
private double calculateHumanYears(int dogYears)
return 13 + (int)(16.0 / 3.0 * (dogYears - 1));
Thanks to all that helped me!

Similar Messages

  • Problem with the program symbols in quality

    Dear all,
    I am facing a problem with the program symbols.
    I have added new global fields in development, i have called those definations in text names. It is working fine.
    After transporting these  program changes in to quality these new global definations are not displaying in quality and varibles are not working.
    Please give me some suggestion.
    Thanks and advance

    Hi Chandra,
    Please check the following.....
    (1)The transport request status in se10 and see if has been successfully imported to QA..
    (2)if all the declarations or code have been collected in a Transport and not saved as temporary objects
    To confirm the same we have to compare the code in quality and development and see if they are the same
    Pls check and revert
    Regards
    Byju

  • I installed Adobe CS6 Design & Web Premium on my Mac Book Pro a few years ago but have repeatedly encountered problems with the programs freezing or not opening properly. It's a Student and Teacher Licensing version so an academic ID is required but I am

    I installed Adobe CS6 Design & Web Premium on my Mac Book Pro a few years ago but have repeatedly encountered problems with the programs freezing or not opening properly. It's a Student and Teacher Licensing version so an academic ID is required but I am no longer a student--can I still reinstall it since my academic ID may no longer be valid?

    Erin Elzo as long as the serial number has been registered under your account at http://www.adobe.com/ then you should be able to continue to utilize the software.  You can find details on how to locate your registered serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • Problem with various programs freezing/not working

    I'm not sure if it's a problem with the computer itself or with the software, but perhaps someone on here can help me.
    For about a week now I've been having problems with various programs on my iMac. These programs include iTunes, Force Quit, Shut Down, Safari, Finder, and certain functions on the keyboard.
    The problems I've been having revolve around the programs freezing up when you either first try to operate them or after opening the programs and trying to click on things within the program itself.
    A good example: I haven't been able to use iTunes past the point of opening it up. Once I try to play a song, it freezes up and the rainbow wheel comes up and just keeps on spinning for eternity, or until I manually reboot the computer via the power button.
    The volume controls on the keyboard don't work at all. When I first boot up the computer, I can press a volume button and the symbol will appear on the screen, but the level won't move up or down and if you press it again after that disappears then it doesn't reappear.
    Force Quit and other applications tend to stay on the screen after you click the quit button or other end/cancel button and won't go away until iMac is rebooted manually by button on back.
    Safari gets stuck on occasion depending on which site I go to. It happened once when I went to MySpace.com, but only cos of one of the flash sites they were advertising. I went to the same site an hour later and it was fine since it was advertising something else. I have a job site I can't access because when I click on the 'jobs' link to look for a job, it gets 3/4 of the way through the upload and freezes.
    And right now I can't tell you which model I have since I can't access the 'About This Mac' info, other than to tell you it's the 20" with 320 GB with Leopard software, Mac OS X v10.5. It gets regular updates.
    So... if there's anyone who could help me, I would greatly appreciate it.
    Please note, I don't have Apple Care since I can't afford it yet, and I just bought my computer in October 2007. Thanks!

    Start with http://www.thexlab.com/faqs/multipleappsquit.html

  • HT201487 i have a problem with xcode programming app when i lunch to it it asking me to enter my password and when i enter it the program show that it is wrong but am 100% sure it's wright so please help me with this issue thanks

    i have a problem with xcode programming app when i lunch to it it asking me to enter my password and when i enter it the program show that it is wrong but am 100% sure it's wright so please help me with this issue thanks

    That's not very intuitive
    Check your mail server setup (mail>preferences>accounts>) choose your MobileMe account and select Outgoing Mail Server (SMTP) dropdown box, select Edit SMTP server list, verify that each instance of the me server has a password, if there are more than one and you only have one account then delete the one without a password.

  • I have a problem with the program Lightroom on Mac

    Hello!
    I have a problem with the program Lightroom on Mac
    Today set a new Lightroom CC 2015 through Creative Cloud but it does not run , I do not know what is the reason
    Please help resolve this issue as soon as possible , I can not continue its work
    Thank you for attention

    Hi Musik
    Take a look at this link and see if it helps:
    Lightroom doesn't launch or quits automatically after splash screen
    Pattie

  • Hello! Help me please, I have a problem with the program occurred after the upgrade to version 3. 6. 16, namely by pressing the button 'Open a new tab' nothing happens. ?

    Hello! Help me please, I have a problem with the program occurred after the upgrade to version 3. 6. 16, namely by pressing the button 'Open a new tab' nothing happens. ?

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    See:
    * [[Troubleshooting extensions and themes]]

  • Problems with audio programs after update to Maverics

    After updating to Mavericks on my Mac Mini there is problem with audio programs. I cant open iTunes at all, I click it and it disappear in a second. Also when I press play in GuitarPro 6 or in Vox player nothing happens. It just wont start playing. I really dont like this update.. and my mac is slower now. I cant downgrade my system back so this is really frustrating to me as a musician.

    I have the same problem with my Conceptronic CH3HNAS and have found a free and easy solution.
    Since a lot of people report they are able to access their NAS using apps other than the Finder itself, I decided to look for a free Lion-compatible File Manager to use instead of Finder.
    I have found muCommander ( http://www.mucommander.com/ ) and indeed it works fine. All I did was click on the button highlighted bellow, go to "bonjour services" and select my NAS. It prompted me for my username and password and voilá, it works fine.
    I keep Finder for everyday use and just load muCommander when I want to access the NAS. At least now I don't have to start my WinXP VM anymore just to access it.
    Hope it helps you.

  • Is anyone having problems with the program MacKeeper not runing a full scan in Mavericks?

    Is anyone having problems with the program MacKeeper not runing a full scan in Mavericks?

    Do not install MacKeeper (and how to uninstall it if you have):
    https://discussions.apple.com/docs/DOC-6221
    by Klaus1
    (Please note that references to the original developers, Zeobit, also now refer to Kromtech Alliance Corp, who acquired MacKeeper and PCKeeper from ZeoBit LLC in early 2013.
    And Here  >  Beware MacKeeper
    In General 3rd Party AV Software is Not Required as Mac OS X tends to look after itself.
    Read Here  > https://discussions.apple.com/thread/4545776?tstart=0
    See Here  >  Antivirus Discussion

  • Problem with this program

    I see this board is very young. Well I'm a high school freshman in a java programming class and i have a little problem with my homework.
    My source code is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class DogsHumanAge extends JApplet
    implements ActionListener
    JTextField inputHumanyears, displayDogyears;
    public void init()
    JLabel labelHumanyears = new JLabel("Enter the dog's age in human years:",
    SwingConstants.RIGHT);
    inputHumanyears = new JTextField(5);
    JLabel labelDogyears = new JLabel("Dogyears = ", SwingConstants.RIGHT);
    displayDogyears = new JTextField(5);
    displayDogyears.setEditable(false);
    JButton go = new JButton("Compute age");
    go.addActionListener(this);
    Container c = getContentPane();
    c.setBackground(Color.white);
    JPanel p = new JPanel();
    p.setLayout(new GridLayout(3, 2, 5, 5));
    p.add(labelHumanyears);
    p.add(inputHumanyears);
    p.add(labelDogyears);
    p.add(displayDogyears);
    c.add(p, BorderLayout.CENTER);
    c.add(go, BorderLayout.SOUTH);
    public void actionPerformed(ActionEvent e)
    int Humanyears = Integer.parseInt(inputHumanyears.getText());
    double Dogyears = calculateDogyears(Humanyears);
    DecimalFormat df = new DecimalFormat("00.0");
    displayDogyears.setText(df.format(Dogyears));
    private double calculateDogyears(int Humanyears, int Dogyears)
    return 13 + (int)(16.0 / 3.0 * (Dogyears - 1));
    The error message i get is:
    DogsHumanAge.java:42: calculateDogyears(int, int) cannot be applied to (int)
    double Dogyears = calulateDogyears(Humanyears);
    The intent of this program is to calculate the number of dog years from the given human years that is inputted into the input box.

    Ok I got the solution. A friend helped me out. I had to make a few minor changes. Now the program looks like:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class DogsHumanAge extends JApplet
    implements ActionListener
    JTextField inputDogYears, displayHumanYears;
    public void init()
    JLabel labelDogYears = new JLabel("Enter the dog's age in dog years:",
    SwingConstants.RIGHT);
    inputDogYears = new JTextField(5);
    JLabel labelHumanYears = new JLabel("Human years = ", SwingConstants.RIGHT);
    displayHumanYears = new JTextField(5);
    displayHumanYears.setEditable(false);
    JButton go = new JButton("Compute age");
    go.addActionListener(this);
    Container c = getContentPane();
    c.setBackground(Color.white);
    JPanel p = new JPanel();
    p.setLayout(new GridLayout(3, 2, 5, 5));
    p.add(labelDogYears);
    p.add(inputDogYears);
    p.add(labelHumanYears);
    p.add(displayHumanYears);
    c.add(p, BorderLayout.CENTER);
    c.add(go, BorderLayout.SOUTH);
    public void actionPerformed(ActionEvent e)
    int dogYears = Integer.parseInt(inputDogYears.getText());
    double humanYears = calculateHumanYears(dogYears);
    DecimalFormat df = new DecimalFormat("00.0");
    displayHumanYears.setText(df.format(humanYears));
    private double calculateHumanYears(int dogYears)
    return 13 + (int)(16.0 / 3.0 * (dogYears - 1));
    Thanks to all that helped me!

  • Problems with my program - urgent

    I am writing a program to convert infix form to postfix form, for example: a+b*c(infix form), abc*+(postfix form).
    I ran my program and entered the arithematic infix form, but I got a messages as follows:
    java.util.EmptyStackException
         at java.util.Stack.peek(Stack.java:82)
         at exe.Exe.convert(Exe.java:57)
         at exe.Exe.main(Exe.java:84)
    Please help me with this problem. Thanks

    Your program tried to execute the peek() method but the stack was empty. This is either an error in your program (there should have been something in the stack) or a condition you need to test for (e.g. if (theStack.empty()) {...}).

  • Hi! having problem with aam program launch for downloading

    hi can you help me having problems downloading app I can't drag and drop and if I try to install using download link it tells me to choose the aam program I want to use.  I have successfully downloaded other apps before and dont know where to find this program really need some help with this. Thanks!

    Thanks
    for quick response
    I can access the aam now that I know what it stands for by opening the application seperately from the desktop and download. What I cant do is download from the cloud site where it is unable to locate and open the aam from there. As long as I can download I dont have a problem with it Im guessing it may well be a windows or browser issue. I will try from chrome if I it doesnt work I will let the firum know I would be interested to know whether its something Im doing or its a common issue.
    Cheers
    Helen

  • Hi friends. Problem with photo program...

    Hi everyone.  Sorry if theres a spelling problem, cause i´m danish. I hope this is the correct place for my issue.
    Anyway the matter is about photoshop elements 9.   It is installed on an Imac 21.5" machine with a i5 - 2.5 ghz
    "sandy bridge" 4 cores proccesor. 12 gb of ram. Everything runs smoothly with snow leopard, cause i´ve read
    about so many users with problems after they opgradet to lion. So i will wait and be happy with my leopard.
    However a have problems with Elements 9.  Fortunely a have aperture 3 also with easy can be used as an
    alternative. With elements i experience the program is very slow. Slow when i scroll up and down and slow
    when i doublelklik on a picture to enlarge it, and slow in nearly every other way.  An other thing i dont
    understand whats coming from is that it gives me the message now and then "missing file´s"  and then the
    option "reconnect missing files"  Why and where is this problem comming from.  My only teory myselve is
    that it is because i have 3 different photo programs. (Elements, Aperture and Iphoto)  I have 2 eksternal
    harddrive connected wich one of them is used as the backup "Timemachine"
    If any of you have some thoughts or ideas they will be welcome.
    Thanks
    Thomas

    Thanks
    for quick response
    I can access the aam now that I know what it stands for by opening the application seperately from the desktop and download. What I cant do is download from the cloud site where it is unable to locate and open the aam from there. As long as I can download I dont have a problem with it Im guessing it may well be a windows or browser issue. I will try from chrome if I it doesnt work I will let the firum know I would be interested to know whether its something Im doing or its a common issue.
    Cheers
    Helen

  • Problems with running programs

    Hi,
    I have written a program and have no problem to compile it. But when I try to run it by typing:
    java filename ,
    I get an error message saying: "Exception in Thread "main" java.lang.NoClassDefFoundError: Filename.."
    Whats my problem??
    Thanks

    Hi there,
    I believe it's a problem with your CLASSPATH settings.
    You can either set ur CLASSPATH in ur Autoexec.bat file by typing the following:
    SET CLASSPATH=.;%CLASSPATH%
    where,
    1. "." refers to the current directory your compiled class files are found (i.e. the default directory that your class file will be generated when you compile ur .java file)
    2. %CLASSPATH% appends whatever you have already set in ur CLASSPATH settings before, to the current one you be setting, i.e. "." - the current directory.
    However, to save urself from all these hassle, you may want to try executing the following command:
    java -cp . filename
    replace "filename" with the filename of ur .class file.
    It should work.
    Cheers
    PTC

  • I can not upgrade to quicktime 7.7.3 for windows vista.  Error message says there is a problem with the program installer.  Any clue as to how to get around this.

    I can not download quicktime 7.7.3 for windows vista.  The error message says that there is a problem with the windows installer.  Any clues?

    The error message says that there is a problem with the windows installer.
    What's the precise text of the message, please? (There's a few different ones I can think of that you might be getting.)

Maybe you are looking for

  • Reg events in alv

    Hi, I created  three radiobuttons  in alv report including with line items. whenver double click  line  items , its going next screen., Here my requirement is when i click  one click  radiobutton should selec

  • Some questions on SAP DMS

    Hello some questions on SAP DMS:- - can versions of same document be shown graphically. ? - can links be created for documents. can we make sure that links are not broken when document is moved ?(links to document on 1st location shall not be broken)

  • Content Managed Image Gallery

    I am looking to see if there is an image gallery available out there that I can use in DreamWeaver that will allow my client to upload images, add categories and captions and the likes. I know nothing of dynamic development so I guess I am looking fo

  • At each startup I note the following errors: DefenderApiLogger

    At each startup I note the following errors: 1-DefenderApiLogger Starting the session "DefenderApiLogger" failed with the following error: 0xC0000035 and 5 Activation of the app Microsoft.windowscommunicationsapps_8wekyb3d8bbwe! Ppleae38af2e007f4358a

  • How to fix when plugin is not loaded into photoshop?

    hi all,      I have created a filter plugin in 64bit then created a link for project.8bf file and copied it into "C:\Program Files\Adobe\Adobe Photoshop CC 2014\Plug-ins"      and restarted photo shop cc it is not showing up in filter menu.