SIMPLE APPLET GETTING RUNTIME ERRORS

I can figure out why this applet will not work, here is the code:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class Convert extends Applet {
JTextField tCentigrade = new JTextField();
JLabel lCentigrade = new JLabel();
JLabel lEqual = new JLabel();
String Fahrenheit;
//Construct the applet
public Convert() {
tCentigrade.setText("45");
//Component initialization
private void jbInit() throws Exception {
this.setLayout(null);
tCentigrade.setText("");
tCentigrade.setBounds(new Rectangle(94, 135, 56, 24));
tCentigrade.addActionListener(new Convert_tCentigrade_actionAdapter(this));
lCentigrade.setFont(new java.awt.Font("Serif", 0, 16));
lCentigrade.setText("Centigrade");
lCentigrade.setBounds(new Rectangle(22, 130, 71, 32));
this.setVisible(true);
lEqual.setFont(new java.awt.Font("Serif", 0, 24));
lEqual.setText("=");
lEqual.setBounds(new Rectangle(171, 139, 34, 15));
this.add(lCentigrade, null);
this.add(tCentigrade, null);
this.add(lEqual, null);
void tCentigrade_actionPerformed(ActionEvent e) {
double F;
double C = Double.parseDouble(tCentigrade.getText());
F = ((9/5) * C) + 32;
Fahrenheit = Double.toString(F);
public void paint(Graphics g)
g.drawString(Fahrenheit,50,50);
class Convert_tCentigrade_actionAdapter implements java.awt.event.ActionListener {
Convert adaptee;
Convert_tCentigrade_actionAdapter(Convert adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.tCentigrade_actionPerformed(e);
}

the error message, if anyone wants to know, was:
java.lang.NullPointerException: string is null
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2584)
at Convert.paint(Convert.java:51)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:374)
at java.awt.Component.dispatchEventImpl(Component.java:3658)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at jva.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
you get it because the string you try to draw at Convert.paint(Convert.java:51) is null.

Similar Messages

  • Getting Runtime error when using HP Simple Pass

    Getting Runtime Error and Firefox shutdown when using HP Simple Pass on new HP dm 1165

    Try HP support. <br />
    http://h30434.www3.hp.com/t5/Operating-systems-and-software/HP-Simple-Pass-Not-working-in-Firefox/m-p/348876

  • Getting Runtime Error while Activating Characteristics in BW sandbox system

    Hi, i m getting  runtime error while activating Characteristics. Error as All InfoObjects Already Saved(locked)
    Short Text
    SQL error 1691 occurred when accessing program "GP4H8Z73D1WOGH7XBIZ54N5GXEG "
       Runtime Errors         DBIF_REPO_SQL_ERROR
    even if creating a new Characteristics same error is comming.
    Key Figures are getting created successfully but problems is comming only with Characteristics. Please Help...
    Edited by: kush kumar on Mar 23, 2010 11:56 AM

    Hi,
    Follow bellow steps:
    a) Once check the Lock entries by useing SM13.
    Goto SM13--> Select your object lock entries --> Select delete.
    b). Acitvate the Infoobject.
    Regards.

  • Getting Runtime error while adding Second page in Smartform.

    I added 2 pages in smartform. When I worked with single page. smartform working properly. Now I added one more page(i.e Second page) I am getting runtime error.  ("The current ABAP/4 program encountered an unexpected
    situation".   A RAISE statement in the program "SAPLSTXBC" raised the exception
    condition "ERROR".)   When I debug this standard program Something width problem getting on line number 110. Both width not matched so program raising exception. Can you please tell me to solve this problem what changes will I do in my smartform?

    Please let me know the details of each page.
    Error can occur in these cases.
    1) You copied the first page to second. and later you change the width of second page
    2) You created the second page and there is template in second page. each column width is not matching with the total width of the template.
    3) windows width is greater than the page width
    Please have a look.
    Regards,
    Nikhil
    Edited by: Nikhil V Kumar on Jul 27, 2010 12:16 PM

  • In VL02N, getting runtime error "dynpro_msg_in_help" when deleting outbound delivery in production

    Hello SD members,
    I have an issue in which while executing VL02N and trying to delete the outbound delivery getting runtime error "dynpro_msg_in_help" in production system.
    Kindly suggest how to solve this...
    Regards
    Venkat

    Hi Venkata Pradeep,
    Can you please proivde more details about an error to understand the issue.
    Regards,
    Pravin

  • TS5376 I can not install itunes.  I get Runtime Error!  R6034.  An application has made an attempt to load the c runtime library incorrectly.  Please contact the application support team for more information.  I've been uninstalling, moving .dll files, re

    The other day I was prompted to update itunes.  I started to, and it crashed my itunes.  Then I tried to uninstall itunes, so that I could turn around and re-install it again.  Now I can not install itunes.  I get Runtime Error! message. R6034.  For the last two hours I have  tried deleting itunes, moving the .dll files to the desktop, restarting the computer (more times than I can count), deleting the temp files, updating my internet explorer, using the fix it program,..... 
    The two messages that I am getting are:
    Runtime Error! Program:c\Program Files (x86)\itunes\Tunes.exe     R6034   An application has made an attempt to load the c runtime library incorrectly.  Please contact the application's support team for more information.
    Also:  Service to 'Apple Mobile Device' (Apple Moblie Device) failed to start.  Verify that you have sufficient priviledges to start system services.

    I too was getting the same message regarding R6034. After many frustrating hours I went to the iTunes support page and clicked on "install and update." When that page came up I scrolled on to "removing and reinstalling iTunes......" There they tell you what files need to be removed and what order to do it in so you can reinstall iTunes. My iTunes works now and I didn't lose any music.
    About the Apple Mobile Device, well that's one of the files that has to be uninstalled. When you reinstall iTunes the Apple Mobile Device is automatically reinstalled.
    Hope this works for you as it did for me. Warning: it takes about an hour to do all this.

  • TS2570 startup itunes get runtime error R6034 and then not correctly installed ERROR 7 (windows error 1114).

    startup itunes get runtime error R6034 and then not correctly installed ERROR 7 (windows error 1114).

    ChrisJ4203 wrote:
    Use this support document to remove iTunes and reinstall it on the computer. Follow the directions exactly. http://support.apple.com/kb/HT1923
    Chris,
    This absolutely solved the problem !!!!!!!!!!!!!!!!!!!!!   I was having the exact same error messages as Mike.
    Thank You for the great fix and I did not lose one song file!!!!!!!!!!!!
    G

  • I am getting runtime error "OBJECTS_OBJREF_NOT_ASSIGNED_NO".

    I am getting runtime error "OBJECTS_OBJREF_NOT_ASSIGNED_NO" in transaction RSPC in BW system.

    Runtime Errors  :       OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Exception         :     CX_SY_REF_IS_INITIAL
    Short text: Access via 'NULL' object reference not possible.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_RSPC_FRONTEND==============CP" had to be terminated because it has come across a statement that unfortunately cannot be executed.

  • When i executed this class file  i am getting runtime errors

    when i executed this class file i am getting runtime errors
    code is :
    import java.awt.event.*;
    import java.awt.*;
    public class Test extends Frame
    java.awt.Window w;
         TextField t;
         Test()
         t=new TextField(20);
         add(t);
         addWindowListener(new WindowAdapter()
                             public void windowDeactivated(WindowEvent ev)                               {                    
                                  w.toFront();          
                                  System.out.println("hai");
         setSize(300,300);
         setVisible(true);
    public static void main(String args[])
    Test t =new Test();
    after executing that class i am getting this errors
    Exception occurred during event dispatching:
    java.lang.NullPointerException:
    at WindowEventDemo.windowActivated(WindowEventDemo.java:76)
    at java.awt.Window.processWindowEvent(Window.java:612)
    at java.awt.Window.processEvent(Window.java:576)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Window.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventQueue.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
    if anybody know how to pls help me

    You are using w that you have not done anything with.
    Add following code to the begining of your cinstructor:
    w = this;
    Then it should work.
    //Anders ;-D

  • While installing latest update I lost ability to open Itunes.  Getting "runtime error" and then next box says error 1114.  Tried uninstalling and reinstalling and does not work.  Getting same error.  Very frustrating.

    Cannot open Itunes after trying to install latest update.  Getting runtime error and then error 1114.  Tried uninstalling and reinstalling and still getting same error.  How do I fix this.  Very frustrating!

    Hi there,
    Earlier iTunes (and supporting applications) need to be completely uninstalled before you can install the new version. Here's the complete Apple info on this: http://support.apple.com/kb/HT1923
    Mobile device application will most likely fail to uninstall, so you would need to visit its location(s) and manually delete the files then folder(s). The location of the folders is documented in this link from Apple.
    It's a pain, but it should work.

  • Hollie**it! I can't even open iTunes anymore.I have Windows 7 Home Premium 64 Bit.  I tried to update iTunes twice today.  This is what I get:     Runtime error!     Program: C:\Program Files (x86)\iTunes\iTunes.exe     R6034  An application has made an

    Hollie**it!
    I can't even open iTunes anymore.I have Windows 7 Home Premium 64 Bit.  I tried to update iTunes Trice Now.  This is what I get: Runtime error!     Program: C:\Program Files (x86)\iTunes\iTunes.exe.   R6034  An application has made an

    Hello there, Vinnie.
    The following Knowledge Base article addresses the very issue you're describing:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Check for .dll files
    Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    Uninstall iTunes and all of its related components.
    Reboot your computer. If you can't uninstall a piece of Apple software, try using the Microsoft Program Install and Uninstall Utility.
    Re-download and reinstall iTunes 11.1.4.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Not getting runtime errors

    I have been using Flex for 6 months and suddenly this week I
    am no longer getting runtime errors which is making it very
    dificult to debug. Does anyone know what would cause runtime errors
    to be disabled?

    Did you turn off "Strict Mode"?

  • When i am posting the Outbound delivery,here getting Runtime error

    Hello
             When i am posting the Outbound delivery,here getting Runtime error
    This is error analysis report
    Error analysis
        Short text of error message:
        No RFC destination is defined for SAP Global Trade Services
        Long text of error message:
        Technical information about the message:
        Message class....... "/SAPSLL/PLUGINR3"
        Number.............. 002
        Variable 1.......... " "
        Variable 2.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
    Please give me solution for this

    HI,
    Probable some missing customising for SAP Global Trade Services - Plug-In.
    Check with your functional consultant if the configuration is correct.
    Check in SPRO.
    Sales and Distribution>Foreign Trade/Customs>SAP Global Trade Services - Plug-In
    Regards,
    Ankur Parab

  • When trying to browse itunes store I am still getting runtime error r6025. I know many others are having tjis problem. Any remedies yet?

    Still getting Runtime Error R6025 when trying to browse iTunes store. So far iTunes support has been no help. Has anyone solved this problem?

    Post this in the iTunes Store forum since it has nothing to do with your iPod nano.
    https://discussions.apple.com/community/itunes/itunes_store
    B-rock

  • TS1368 I keep getting runtime error r6025 when searching itunes store

    I have tried reinstalling latest download but just get runtime error r6025 and itunes then shuts down

    Hi i had that too, dont know why. all i did to fix it was go into control panel, then uninstall programs, then found Itunes on the list. i clicked to uninstall and it then gives you a choice, to uninstall or to change, or to repair. i chose repair and it fired up itunes and repaired it, that was that and it works fine now, try it, good luck.

Maybe you are looking for

  • Caller ID not working anymore

    Hello, I use to have my caller ID pop up on my Television, but it no longer shows up. I checked the settings one all of my TV sets and it shows that Caller ID is available and enabled. I'm not sure what else to do or what else to check. Any help is g

  • Dreamweaver cc 2014 won't start

    Installed and tried to start for the first time. Will not do anything... Log just read "ASU has quit unexpectedly." Help!

  • Do I use bytes when I download music

    How many bytes are used when you download music from the clouds

  • 10.4.9 MacBook Pro Core 2 Duo AirPort/wireless issues

    Since I installed 10.4.9 my wireless connection has been playing up. The wireless signal varies wildly (even though the AirPort Express is only 2m away and the PowerBook sitting next to my MacBook stays on full signal) and the internet connection app

  • Cisco SPA509G to Cisco SPA509G

    Is there a way to configure the phones (Cisco SPA509G) so that they talk to each other, like an intercom system? Or configure them to talk to each other, IP to IP? Basically internally we would have 16 Cisco phones, they would connect to a Cisco swit