Applet is not working and I do not know why it is not working

I cannot figure out why my applet is not working. Can someone assist me with this problem?
Here is the code:
As you will soon find out some of those imports can be ignored.
import java.lang.Integer;
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.Graphics.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.text.*;
import javax.swing.event.*;
import java.awt.event.*;
import javax.swing.JApplet.*;
import javax.swing.JFrame.*;
import java.applet.Applet;
import javax.swing.border.*;
import javax.swing.Spring.*;
import java.awt.geom.AffineTransform;
import java.awt.Graphics2D;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.math.*;
public class Test extends JApplet{
JFormattedTextField Relfield;
JFormattedTextField Relfield2;
JFormattedTextField Relfield3;
GridLayout layout = new GridLayout();
public void init() {
Double d = 0.0;
Double e = 0.0;
Relfield2 = new JFormattedTextField();
Relfield3 = new JFormattedTextField();
Relfield = new JFormattedTextField();
Relfield.setText(d + "");
Relfield2.setText(e + "");
TextFieldHandler handlers = new TextFieldHandler();
Relfield.addPropertyChangeListener(handlers);
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
button1.addActionListener(new T5C());
button2.addActionListener(new T6C());
Container c = getContentPane();
c.setLayout(layout);
c.add(Relfield);
c.add(Relfield2);
c.add(button1);
c.add(button2);
class T5C implements ActionListener
public void actionPerformed(ActionEvent e) {
Double b = (Double)(Double.parseDouble(Relfield.getText())) + 1;
Relfield.setValue(b + "");
Relfield2.setValue(b + "");
class T6C implements ActionListener
public void actionPerformed(ActionEvent e) {
Double b = (Double)(Double.parseDouble(Relfield.getText())) - 1;
Relfield.setValue(b + "");
Relfield2.setValue(b + "");
public class TextFieldHandler implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent e) {
Object source = e.getSource();
if (source == Relfield) {
Double Rel = ((Double)Relfield.getValue()).doubleValue();
Relfield.setValue(Rel);
Relfield2.setValue(Rel);
//BigDecimal myu = new BigDecimal("Relfield.getValue()");
public static void main( String[] argv ) {
        JFrame frame = new JFrame( "General Shear Mode Damper Design" );
        frame.addWindowListener( new WindowAdapter(){
            public void windowClosing( WindowEvent e ){
                System.exit( 0 );
        JApplet applet = new Test();
        frame.getContentPane().add(applet);
        applet.init();
        frame.setSize( 1020, 720);
        frame.setVisible(true);
}

The applet is not running at all and I can't figure out the error messages.
The error messages are below:
C:\Users\zite.1\Desktop>javac Test.java
C:\Users\zite.1\Desktop>java Test
Exception in thread "main" java.lang.NullPointerException
at Test$TextFieldHandler.propertyChange(Test.java:89)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.awt.Component.firePropertyChange(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Panel.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at Test.main(Test.java:112)

Similar Messages

  • My securety code on my debit card is not working and I need to know why?

    my securety code on my debit card is not working and I need to know why?

    You need to contact iTunes support. We are users here just like you and would have no idea why it isn't working. At the bottom of the iTunes Store page in iTunes there is a contact link.

  • Galaxy Note Edge Release...Verizon knows why no reason not to tell us!!

    I know that many of you are like me and are waiting for the  release of the Note edge on Verizon. I have read the many threads and saw your complaints and ideas. I had to ad mine. I have been a Verizon Customer for some time and like the cell service. I Do not like the fact that they took my unlimited data away the last time I renewed but I am living with it.
    I am greatly disturbed on hoe they are treating there current Customers in regards to this release. I know there is a reason that Verizon is dragging their feet and for them not to just come out and be upfront is unacceptable. They could just say we are having issues with software or price or are waiting until a certain time.  To tell their reps to just say they have no info; just shows that they do not care about their customers and they believe they are the only game in town and can do what they want.
    If they would just give honest info they would gain even more. I too am going to jump ship. I have watched other people enjoy the phone and are in fact paying less a month for more service than Verizon Offers. Example I currently pay $80 a month for my phone with only 4g of data and 450min of talk. I could switch and save $20 a month and get unlimited everything. However, I would like to remain loyal to Verizon, but there is only so much bad Customer service one can take.
    I am going to wait till the end of the year and if the Note edge is not released, Verizon will force me to move to Sprint. Which, in my area has the same coverage as Verizon.
    I am really hoping for a Christmas Present from Verizon and see the Note Edge available be for the end of Dec. Or for Verizon to just come right out and say what is going on!!!!!!
    PS.
    It is not the Reps fault, they really do not know ANYTHING, because they are not told!!

    I hear you. if I do leave I am planning on paying for the phone up front. I do not believe in making payments on a phone. The is just plain dumb to me. If you are going to pay full price anyway by using easy pay you might as well pay for it up front on a credit card, if you can, and not be locked into a contract. I was on ATT's site yesterday and the phone is about a hundred dollars more there.
    I just wish Verizon would talk to there Customers. I simple honest statement on what the issue for them is would go a very long way.

  • MY USB micro SD card is not working and I don't know why?

    I recently purchased a micro SD card and for whatever reason my usb micro sd card reader is not working.  It recognizes a device is plugged in but doesnt recognize any files on their.

    Nvm I found everything on their was hidden via the properties on my windows pc. I'll have to fix it using a friends pc.

  • I reboot my computer, wiping everything clean and reinstalling programs.  iphoto did not install and I don't know why.  I thought I would just purchase the download, but it says that I need to chose an application to open it.  What so I do?

    I had some issues with my computer.  So, I took it back to the original by installing the original software.  The problem is that iphoto doesn't show up anywhere.  I thought I would purchase it but it says "what application do you want to use to open it."  I don't know what to do.  Help please.

    reinstall from the original source
    Could be
    1 - the restore disks that came with the computer
    or
    2 - the iLife DVD that you purchased
    or
    3 - the app store - log in under the Apple id used to purchase the software or to set up the computer - look under purchases - you might have to unhide or accept the Application first
    LN

  • After shutting down my iMac last night, Firefox will not open this morning and I don't know why?

    My iMac is set to open to my home page My Yahoo with Firefox browser. This morning my Firefox browser is not opening and I don't know why? It does open on my new MacBook Air as per usual. I click on the icon but it does not respond even though I have opened it. this has never happened to me before and I don't know why it's happening now. I did a clean reinstall but that didn't work. Now what?????? With the add-on Troubleshooter should I have asked this question on my iMac using Safari? I am on my MacBook Air asking it.

    Actually it does open but nothing shows up. I can't use my iMac unless I use the Safari browser and I want to use Firefox! I'm at my wits end as to how to fix this. I have tried everything that troubleshooting has suggested on Mozilla support. Help!!!!!!!!

  • I have an older iMac 5,1 and the disc drive no longer works. I was hoping that I could the Apple USB super drive as a replacement, but the info on the super drive page says compatible with iMac 2012 or later. Does anyone know why it would not work for me?

    I have an older iMac 5,1 and the disc drive no longer works. I was hoping that I could the Apple USB super drive as a replacement, but the info on the super drive page says compatible with iMac 2012 or later. Does anyone know why it would not work for me?

    A reply to similar question (Q & As , in product page Apple Store) says:
    "...dissable the internal reader hardware from devices setup. Then plug the external usb superdrive and that's it."  Answered by Enrique T from Lima Oct  25 2013.
    If you can locate an external Apple USB 'Air" superdrive for earlier model MacBook Air, that should work. The newer one for the Air is the same as for iMac, now.
    You may be able to use other brands of external USB optical drive with your older intel-based iMac, as some of them function capably. A few should also be able to see system discs or other bootable utilities on DVD.
    Hopefully this helps.
    Good luck & happy computing!

  • Iphone 3gs software update version 6.1.6 not able to do it need help and also want to know if i do not update it will my phone stop working

    Hi I am getting a message of updating my iphone 3gs software version ios 6.1.6 but i am not getting an option to download it how can i update this version on my phone and if i will not update it will my phone stop working i am confused as i tried a lot online to search and download for it but not find it and now want rectification of it and also want to know if i do not update it what will happen next. please a little help required in this if its possible please reply on this as i am in need of this phone and do not want it that it should stop working just bcoz of it

    manubakshi26 wrote:
    Hi I am getting a message of updating my iphone 3gs software version ios 6.1.6 but i am not getting an option to download it how can i update this version
    Do the Update using iTunes on your Computer.
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch
    Make sure you have the Latest Version of iTunes (v11.1.5) Installed on your computer
    iTunes free download from www.itunes.com/download

  • I tried to sync my iphone4 to my pc (not mac) and the following message went out: I tunescould not back up the iphone because an error occurred   I restore my phone but nothing happened. What shall I do? (my ipad is working perfectly)

    I tried to sync my iphone4 to my pc (not mac) and the following message went out: I tunescould not back up the iphone because an error occurred   I restore my phone but nothing happened. What shall I do? (my ipad is working perfectly when i sync it)
    I dont know why this happens.

    Unfortunately, "because and error occured" doesn't give you much to go on.  Some general things I would try if you haven't already:
    Use Disk Utility on your mac to repair disk permissions, then reboot and try backing up again.
    Use Finder to go to ~/Library/Application Support/MobileSync/, then control-click on the Backup folder and select Get Info, then check Sharing & Permissions at the bottom and make sure your username has read & write priviledges
    Try closing all apps, then reset your phone: double-tap the home button, tap and hold the apps at the bottom until they wiggle, tap the minus sign on all apps to close them.  Then reset your phone: hold the on/off and home buttons until you see the Apple logo (ignore the off slider that appears first), and release
    Try a different usb to dock connector cable; ensure that your case isn't interfering with a good connection to the dock connector at the bottom of your phone; clean the dock connector at the bottom of your phone (e.g., with a dry toothbrush); troubleshoot your usb connection (http://support.apple.com/kb/TS1286)
    I know this looks like a laundry list, but unfortunately it's hard to isolate the problem without a clear error message.  If the problem persists, you might try posting in the iMac or iTunes forums for other ideas.

  • Does anyone know why Lion does not support the HP LaserJet CP1025nw and if there is a work around?

    Does anyone know why Lion does not support the HP LaserJet CP1025nw and if there is a work around while we wait for a dedicated driver? HP claims apple provides the drivers but I am not certain of this.

    See the following link for details from the hp.com site on using your model of printer with Lion along with a number of other FAQs :
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02915680&cc=uk&dlc=en&lc=en &os=219&product=4052972&sw_lang=
    Thanks
    AF

  • I have an Iphone 5 that my friend gave me that does not work and i want to know how many gb it is. How can I tell?

    I have an Iphone 5 that my friend gave me that does not work and i want to know how many gb it is. How can I tell?

    Ask your friend? What difference does it make if it does not work?

  • How come my iMessages aren't sending anymore I have a iPod touch 5th gen. It was working and then like 5 minutes later it would not send any messages it always said not delivered even when I press retry and it doesn't send at all I even updated my iOS.

    How come my iMessages aren't sending anymore I have a iPod touch 5th gen. It was working and then like 5 minutes later it would not send any messages it always said not delivered even when I press retry and it doesn't send at all I even updated my iOS to iOS 7.04 to see if it will send my iMessages but it won't. I tried to send a message to anyone but it won't work even when before I would be able to send messages but something weird happened that made my messages not delivered. Is there any way I change fix it?

    iOS: Troubleshooting Messages

  • HT4009 Every time I tried to do in app purchase, it showed please contact itune to complete the transaction, I have already saved my credit card info and it worked before, I do not know why it no longer work, I do not have any restriction

    Every time I tried to do in app purchase, it showed please contact itune to complete the transaction, I have already saved my credit card info and it worked before, I do not know why it no longer work, I do not have any restriction

    Gee... maybe you should try contacting iTunes support like the message told you to do.

  • I am trying to print a fillable form.  It will not print and I get two error messages "document could not be printed" and "there were no pages selected to print."  Th latter is not true.  Won't print all, the page I am on, nor any series of pages inserted

    I am trying to print a fillable form - - an application for a Chinese visa.  It will not print and I get two error messages:  "document could not be printed" and   "there were no pages selected to print."  The latter is not true.  Won't print at all, the page I am on, nor any series of pages inserted.
    Am using a MAC desktop and a Cannon PIXMA MX922 printer.
    I need to print this form now that it is filled out?  What can I do? 

    Hello PW, I am having this problem and all suggestions haven't worked yet. Where is the Preferences|Documents you are referring to? I am on a PC and using Windows.
    EDIT: I found it and did, but still not working.

  • TS3297 I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    These are user-to-user forums, you are not talking to Apple here. You can contact iTunes support via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then probably Purchases, Billing & Redemption

  • Anyone know why, firefox does not remember password for a site when you remove password from the view password site? I removed a pasword in the view password window and now it not asking me to remember and also it is not remembering the password when I go

    Anyone know why, firefox does not remember password for a site when you remove password from the view password site? I removed a password for a site that was not remembering the correct password for the "view password" window and now it does not guess the password and does not remember the password for that site. All other sites are being remembered.
    == This happened ==
    Every time Firefox opened
    == After I deleted the password from the view password window.

    The saved password feature worked well, but the site I had saved the password for required that I change the password. I have found no way to update the password in Firefox. After I deleted the saved password, Firefox did not ask if I wanted the new password saved. When this happened before, I removed and re-installed Firefox, and then it worked. I hope there is another way to update a password.

Maybe you are looking for

  • Lock-up when opening file

    I have a problem with dreamweaver locking up when I open a file. The index file, other files open up fine. I am thinking I need to delete the preference files but don't know how to do this. Can someone help me on this?

  • Write to BMP or JPG file

    Can anyone tell me if there is a VI available that will write a graph display to a BMP if JPG file. This is to save having to [print screen] and edit the picture all the time. Yours sincerely, Chris McCrory Project Engineer __________________________

  • Problem in entering gl account in VKOA

    Entry CAIN(chart of account) 0058150000(GL Account no) does not exist in SKA1 - check your entry   in transaction code VKOA

  • Can I use my iPod to restore iTunes library?

    The hard drive on my MacBook Pro recently "died" and I am unable to recover any files from it. I had a new hard drive installed and want to know if there s there any way to use my iPod, which has all of my music and photos on it, to restore my iTunes

  • Elements 12 stopped working on my MAC

    I cannot open Elements 12 Editor and Organizer When I try to oped the Editor this windows appears (impossible to open the app ...) I tried to reinstall the app from the Adobe download page but the Adobe Download Assistant does not open (message is: t