Search found 16 matches

by vindsr2211
Thu Oct 22, 2009 5:23 am
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Hello

I also have another query..!

Do we have to just implement a class and demonstrate the basic implementation as per the requirements? or must we design a reusable component?

Kindly let us know as soon as possible so that we can have sufficient time to work upon.

Thank You
by vindsr2211
Tue Oct 20, 2009 11:46 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Also specified in the question is :
For a more challenging project, do the same for a CategoryDataset or an XYDataset.

Is this mandatory?
Are we awarded extra credit for this?
by vindsr2211
Tue Oct 20, 2009 11:21 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Should we save a table and must pre-saved tables be retrievable?
Must all the saved table names be retrievable every time we run the application ?
Must this condition work?
Or is it ok if the basic working is demonstrated?
by vindsr2211
Mon Oct 19, 2009 8:40 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Adding a row, deleting a row, editable cell

Do these 3 imply editable components!?
Are these enough?
by vindsr2211
Mon Oct 19, 2009 7:32 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

what if there are multiple columns like First name, last name, and marks
How do I pass these?

Or is it fine if it works for a string and a double value?(Based on the question)
by vindsr2211
Mon Oct 19, 2009 6:22 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

And to validate the data in the table:
Must we use InputVerifier class? or must we verify manually? or is there any other thing which can help over this?
by vindsr2211
Mon Oct 19, 2009 6:03 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Thank You.
It works.

But what if there are multiple columns like First name, last name, and marks
How do I pass these?

Or is it fine if it works for a string and a double value?(Based on the question)
by vindsr2211
Mon Oct 19, 2009 5:08 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Inspite of the editing also, the error remains at the same place. Java4.java:86: cannot find symbol symbol : method valueOf(java.lang.Object) location: class java.lang.Double result.setValue((String)tabModel.getValueAt(i,0),Double.valueOf(tabModel.getValueAt(i,1))); ^
by vindsr2211
Mon Oct 19, 2009 4:46 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

result.setValue((String)tabModel.getValueAt(i,0),Double.ValueOf(tabModel.getValueAt(i,1))); I did this. But still Ive been getting the following error: Java4.java:86: cannot find symbol symbol : method ValueOf(java.lang.Object) location: class java.lang.Double result.setValue((String)tabModel.getVa...
by vindsr2211
Mon Oct 19, 2009 4:37 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

result.setValue((String)tabModel.getValueAt(i,0),(String)tabModel.getValueAt(i,1));} If I give the result.setValue thing as such, I am not able to compile the program. The following error is shown: Java4.java:85: cannot find symbol symbol : method setValue(java.lang.String,java.lang.String) location...
by vindsr2211
Mon Oct 19, 2009 4:34 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

private PieDataset createSampleDataset() { final DefaultPieDataset result = new DefaultPieDataset(); for(int i=0;i<numrows;i++) { System.out.println("\n val 1 in Row: "+i+"="+tabModel.getValueAt(i,0)); System.out.println("\n val 2 in Row: "+i+"="+tabModel.getValueAt(i,1)); try{ result.setValue((Stri...
by vindsr2211
Mon Oct 19, 2009 4:31 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double at Java4.createSampleDataset(Java4.java:84) at Java4.drawChart(Java4.java:231) at Java4.actionPerformed(Java4.java:165) at javax.swing.AbstractButton.fireActionPerformed(AbstractB...
by vindsr2211
Mon Oct 19, 2009 4:19 pm
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

private PieDataset createSampleDataset() { final DefaultPieDataset result = new DefaultPieDataset(); for(int i=0;i<numrows;i++) { System.out.println("\n val 1 in Row: "+i+"="+tabModel.getValueAt(i,0)); System.out.println("\n val 2 in Row: "+i+"="+tabModel.getValueAt(i,1)); result.setValue((String)ta...
by vindsr2211
Mon Oct 19, 2009 1:53 am
Forum: JFreeChart
Topic: How to add a chart to a specific panel?
Replies: 8
Views: 6078

Re: How to add a chart to a specific panel?

If you are able to show it on another frame you must be able to show it on the previous frame also. Make sure the components you add are to the same frame. Before displaying the components of the second level of the frame, i.e. I mean your next frame, set the first frame to : frame.setVisible(false)...
by vindsr2211
Mon Oct 19, 2009 1:51 am
Forum: JFreeChart
Topic: Editing a Component using JTable
Replies: 25
Views: 24940

Re: Editing a Component using JTable

I am giving the default data for the DefaultPieDataset as follows: final DefaultPieDataset result = new DefaultPieDataset(); result.setValue("ABC", new Double(12.3)); result.setValue("DEF", new Double(4.5)); Using the above e.g., I am trying to convert the TableModel to PieDataset as follows: result...