Editing a Component using JTable
-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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)
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)
-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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?
Must we use InputVerifier class? or must we verify manually? or is there any other thing which can help over this?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Editing a Component using JTable
I'm not 100% sure about this. You should look at the events that the JTable fires, and also the TableCellEditor, and see which one you could listen to in order to invoke your validation code. This is definitely the tricky part.vindsr2211 wrote: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?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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)
How do I pass these?
Or is it fine if it works for a string and a double value?(Based on the question)
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Editing a Component using JTable
Your TableModel should have only two columns, since it is explicitly for editing a PieDataset and completely under your control. The editing component is intended to be reusable, but it has only one purpose and that is to permit editing of a PieDataset.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
Re: Editing a Component using JTable
Adding a row, deleting a row, editable cell
Do these 3 imply editable components!?
Are these enough?
Do these 3 imply editable components!?
Are these enough?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Editing a Component using JTable
Sure, the dataset for a pie chart is essentially a 2 column table with N rows. The first column contains keys (and each key should be unique) and the second column contains values (these should not be negative, since that's hard to display on a pie chart). Now if you can add rows to this table, delete rows from this table, and modify existing rows, then you have a component that will let you enter just about any pie chart dataset you can imagine...which would be a nice component to have. Especially if it was wired up with some event notifications that could be listened to externally and used to update a separate chart to display those data values. But even just getting the table to a usable state for editing would be good progress.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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?
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?
-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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?
For a more challenging project, do the same for a CategoryDataset or an XYDataset.
Is this mandatory?
Are we awarded extra credit for this?
-
- Posts: 16
- Joined: Mon Oct 19, 2009 1:40 am
- antibot: No, of course not.
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
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
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Editing a Component using JTable
It's not mandatory. I'm not exactly sure how credit is being assigned, but I'd certainly rather see the easier task done well than the harder ones done badly.vindsr2211 wrote:Is this mandatory?
Are we awarded extra credit for this?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

