ASKER
how could I add jcombobox to specific column and allow the client to choose one of the values in the jcombobox and store the new value in the array listWhat values would be in the combo? Ordinarily using a combo in a cell implies a set of values not directly in the table model, but joined in from elsewhere
ASKER
The content of specific column before adding jcombobox like this
2
4
5
And after addind jcombobx
2
2
2
And when a customer clicks on 2 the list appears is 2 4 5
How could I join themTo answer that specifically, it's necessary to know what your combo box is intended to do and where it gets its model from
Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.
TRUSTED BY
Could you rephrase that please.
Baseline:
1. You'll have to write your own TableModel (extending DefaultTableModel)
2. You'll have to write a custom CellEditor (extending DefaultCellEditor) that uses a JComboBox as its editor.
3. The above two points might sound difficult, but in fact they aren't.
You'll just have to make yourself familiar with the concept of table models and table renderers and editors.
How to use tables: http://docs.oracle.com/javase/tutorial/uiswing/components/table.html
This article has the sections "Creating a Table Model" and "Using a Combo Box as an Editor".