My Jbutton do not take the values of the checkboxes...PLEASE help...

public class  buttonHandler implements ActionListener
        public void actionPerformed(ActionEvent event)
            if(event.getSource()== next)
                pieChart.Chart();
                pieChart.setTitle ("Display Chart");
                pieChart.pack();
                pieChart.show();
                pieChart.setSize(500, 500);
                pieChart.setVisible(true);
            }else if (event.getSource()==graduate && graduate.isSelected())
                      PieChart2D chart2D = new PieChart2D();
                      LegendProperties legendProps = new LegendProperties();
                      String[] legendLabels = {"UnderGraduate", "PostGraduate"};
                      legendProps.setLegendLabelsTexts (legendLabels);
                      numSets = 2;
                      numCats = 1;
                      numItems = 1;
                      Dataset dataset = new Dataset (numSets, numCats, numItems);
                      dataset.set (0, 0, 0, file.uGraduate.length()/13);
                      dataset.set (1, 0, 0, file.pGraduate.length()/12);
                      chart2D.setLegendProperties (legendProps);
                      chart2D.setDataset (dataset);
            } I am trying to get the Jbutton to take the values of the checkbox but i can't make. This is what is have so far. If the values from the check box are in the class the button indicate to the piechart is diplayed. I have registered some more checkboxes after this code still with no values inside. I am using some not java classes to display the piechart. The dataset is a class in this package which stores the values for the pie chart. The error i am getting has as follows.
Validating PieChart2D
Validating Chart2D
Validating Object2D
Validating Object2DProperties
Object2DProperties was valid
Object2D was valid
Validating Chart2DProperties
Chart2DProperties was valid
LegendProperties is null
Chart2D was invalid
Validating PieChart2DProperties
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
PieChart2DProperties was valid
        at net.sourceforge.chart2d.Chart2D.updateChart2D(Chart2D.java:152)
Dataset is null
        at net.sourceforge.chart2d.PieChart2D.getPreferredSize(PieChart2D.java:200)
Validating MultiColorsProperties
        at java.awt.FlowLayout.preferredLayoutSize(FlowLayout.java:368)
MultiColorsProperties was valid
        at java.awt.Container.preferredSize(Container.java:1558)
Possibly unable to check for all invalidities because of early invalidity
        at java.awt.Container.getPreferredSize(Container.java:1543)
PieChart2D was invalidEverything that is valid is in the class the button points to the other and the invalid in the ones i am trying to enter.
Could someone please show me how to do it...? I need to get the values from the checkbox to the button...well that is what i think...
I post the same thing the event handling forum but i didnt get any replay and i thought of trying this one as well...

Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html.

Similar Messages

  • My iPad stop working suddenly i see black screen only pressing the home? and sleep button dose not solve the  problem please help?

    My iPad stop working suddenly i see black screen only pressing the home and sleep button dose not solve the problem please help ?

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • HT1918 How do I reset my account I have 0.91 $ I can not change the Store please help

    How do I reset my account I have 0.91 $
    I can not change the Store please help
    plz help

    Change your password
    iTunes Store: Retrieving and changing passwords (Apple ID)
    Alert itunes support
    https://www.apple.com/support/contact/

  • Take long to sync contacts and notes calandario 6800 and with Microsoft Outlook  already have 2 hours and not finish the process please help

    take long to sync contacts and notes calandario 6800 and with Microsoft Outlook
    already have 2 hours and not finish the process please help

    Where error messages are you getting?
    Can you not do both? Send and Receive?
    Check but I think yo have the right setting described here:
    iCloud: Mail server information

  • HT5699 I try to buy from your iTunes program and I can not buy me a message appears stating that I am the first time Buy and necessary to answer the questions, but I do not remember the answer please help

    I try to buy from my iTunes program and I can not buy me a message appears stating that I am the first time Buy and necessary to answer the questions, but I do not remember the answer please help

    You are not addressing Apple here we are just users like you.
    Security questions
    Read this note for information on how to reset the security questions http://support.apple.com/kb/HT5312
    This user tip may also help you Security Questions

  • When selecting the camera on 3gs the screen just goes black i can still take a photo using the top volume button but not with the screen please help

    hello there
    when selecting the camera on my 3gs the screen goes black and has no responce i can take a picture with the top volume button but cannot see it until i open photos
    please can anyone help
    thankyou andy

    Try closing the Camera app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Camera app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Camera app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset (unless this is what you mean by powering off and restarting) : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • FileChooser is not invoking the file Please Help

    Hi,
    I have created a menuItem when user selects from the menuItem the file chooser come's up after that when he select any file from the JFile chooser dilalog box the r not invoked.Here is the code, please tell me where am i wrong. Please Help me out
    Thanking u
    in advance
    public void actionPerformed(ActionEvent e)
    Object source = evt.getSource();
    if(source == dialerItem)
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new File("."));
    chooser.setFileFilter(new Javax.swing.filechooser.FileFilter()
    public boolean accept(File f)
    String fname = f.getName().toLowerCase();
    return fname.endWith("html") || f.isDirectory();
    public string getDescription()
    return "Html Files";
    int r = chooser.showOpenDialog(this);
    if(r == JFileChooser.APPROVE_OPTION)
    chooser.getSelectedFile();

    Not "invoking" the file? What does that mean? What did you expect it to do?
    What it actually does, in the last line of your code, is to create a File object based on the selected file, then to discard it because you didn't assign it to a File variable.

  • HT4623 4s hung showing apple icon continuously blinking every 10 seconds. itunes not recognising the device please help?

    my iphone suddenly stopped working. only apple icon is showing blinking once for every 10 to  15 seconds. Itunes is not recognising my device on my lap top. I can  not do anything. please help me.

    How did you get the VMWare sync to work? I hate Apple at this point.

  • Can not download anything, a warning my security settings will not allow the download. please help

    can not download anything,  a warning, "securiy setting will not allow the download"

    Hi,
    Are you using IE? If yes, please follow this to fix.
    Good luck.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • HT4113 I need to unlock an ipad -- but do not know the passcode, please help

    I need to unlock my son's ipad -- one of his friends has set a passcode but I do not know what it is.
    Itunes won't connect to the ipad without the passcode, please help

    If you can't get his friend to remove it, then you will need to connect the iPad to the computer that you normally sync to and you should then be able to reset the iPad and re-sync your content to it (http://support.apple.com/kb/HT1212) - you may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808

  • Query Prepared Statement Does NOT Return ANY Values !URGENT! PLEASE HELP...

    Hi,
    Please help me in the following.I'm desperate...
    I'm using PreparedStatement to do multiple queries in the same Table of a Database(ACCESS).
    The rows of the Table look i.e like this :
    (TABLE NAME == PERSONS)
    PERSON_INDEX__TIME_PERIOD_________SPORT
    1_______________1________________Basketball
    1_______________2________________Football
    1_______________3________________Tennis
    2_______________1________________Something
    I populate my PreparedStatement using something like :
    java.sql.PreparedStatement st = con.createPreparedStatement("SELECT SPORT FROM PERSONS WHERE PERSON_INDEX=? AND TIME_PERIOD=?");
    Now, when I do something like :
    try
    st.setInt(1,1);
    st.setInt(2,1);
    st.addBatch();
    }catch(SQLException e){}
    st.executeQuery();
    ResultSet results = st.getResultSet();
    while ( results.next() )
    System.out.println("->"+results.getString("SPORT"));
    I trully get as output :
    ->BasketBall
    But when I populate it some more :
    try
    st.setInt(1,1);
    st.setInt(2,1);
    st.addBatch();
    //***Query some more***
    st.setInt(1,1);
    st.setInt(2,2);
    st.addBatch();
    }catch(SQLException e){}
    ... and I execute I DON'T GET :
    ->BasketBall
    ->Football
    but NOTHING!!! - the ResultSet HAS NO ROWS
    This thing is driving me mad.
    Can you please help me out?
    Please post the code if neccessary...

    There is something wrong in your understanding of batching the statements. Basically you will add either update or insert or delete statements to your batch.
    If you add a select statement, it will throw 'java.sql.BatchUpdateException: invalid batch command'. And moreover 'st.executeBatch()' is the method you need to invoke.
    If you don't execute the batch using 'executeBatch()' method then, it must throw the exception,
    'java.sql.SQLException: error occurred during batching: batch must be either executed or cleared'.
    You need to rework on your code, I believe.
    Sudha

  • HT4199 I dropped my ipodtouch to the sink. Now i can not search the Wifi. please help me ;((

    I dropped my Ipod touch to the sink. Now everythings is working now but WIFI. Please help me to fix it. Thank you very much.

    Is this the problem:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    If so then usually an appointment at the Genius Bar of an Apple store is in order.
    Other wise prose provide more information:
    - Does the iPod see the network?
    - Have you tried other networks?
    - Error message?
    iOS: Troubleshooting Wi-Fi networks and connections

  • The fast movement video on capture is jerking, actual not in the tape. please help any setting required

    The Fast movement videos whicle capture is jerking and is not smooth . iam using HP Z600 workstation with Nvidia  Quadro 4000 graphics card and Matrox Mojito card for I/O.

    Ok, so here's the update. After many sleepless nights, finally some good news
    I removed my Firewire hub and connected only the capture device to the computer. I then did a capture test to the internal memory on the same tapes I had tried before and it worked beautifully. NO BREAK IN CADENCE (I can hardly believe it). Then, I connected only the external memory drive to the working firewire port on my computer. That also worked.
    So David, you were right. I think I was overloading my working firewire entrance with the hub. But, I have been told that my computer will not accept a firewire card. So I have decided to capture loads of footage onto my internal with the capture device connected to my computer and then connect my external hard drive to the computer and import these files from the internal. Even though it's more work, it is all I can manage right now (the project cannot afford a new computer...)
    Anyway, thank you very much. You have put and end to the madness.

  • I bought something from an app and my product never appeared but it did take the money please help

    i had $10.10 in my apple account and i bought gems for $9.99 and it took the money cause i now have $0.11 but i didnt receive the gems on clash of clans

    Contact the application's creator or the iTunes Store staff.
    (122603)

  • I can download and install ios7.04 ican get text but can not delete the text please help me

    how to download and install iso7.04 for my cell phone
    <Personal Information Edited by Host>

    Updating iOS

Maybe you are looking for

  • Windows 7 x64 on G6230 driver help(camdriver)

    we just installed x64 windows seven on our lenovo g230 but we're having problems installing the camera drivers and energy management...we used the vista cd driver that came along with the unit(all the drivers work well except those two) need help in

  • Help with XML to HTML or JS or ASP?

    Let me begin by saying that I am new to using XML. I have been able to create a simple tree menu using XML tags, and then saved it as *.xml.  I am using Version 6.0. My problem is that I do not know how to convert the xml file into a viewable web pag

  • Need step by step directions for moving itunes library to external HD

    About to crash my PC...recently purchased apple tv and kids have bought many movies and tv shows. They are filling my hard drive - between movies, tv and music I have 756 GB. Searching the problem on this board, i think eternal HD is solution. Can so

  • Bullet Proof Arch System

    Hi Arch community. I have a VPS running Arch (its only for personal use, portfolio hosting, some storage) which i first set up exactly a month ago. Just like someone said on the IRC (sorry random helper, i don't remember your name, no credits today )

  • How to send JMS Message with use title, content, and attach file

    I use OpenJMS server such as Message server and use Tomcat 4.0 as web server. I want to use JMS to send Message that message have title, content, and can attach file.