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

publicclass buttonHandlerimplements ActionListener

{

publicvoid actionPerformed(ActionEvent event)

{

if(event.getSource()== next)

{

pieChart.Chart();

pieChart.setTitle ("Display Chart");

pieChart.pack();

pieChart.show();

pieChart.setSize(500, 500);

pieChart.setVisible(true);

}elseif (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 isnull

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 isnull

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 checkfor all invalidities because of early invalidity

at java.awt.Container.getPreferredSize(Container.java:1543)

PieChart2D was invalid

Everything 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...

[3577 byte] By [mysthrioa] at [2007-10-2 14:35:37]
# 1
Try again. Your question is unintelligible.What button? What "values of the checkboxes"? The only value a checkbox holds is if it is selected.
BaltimoreJohna at 2007-7-13 13:00:38 > top of Java-index,Security,Event Handling...