about objects name

Hi,

I have object that create a table and return scroll with this table into a dialog.

every mouse click I creat another table........to else dialog.

I don't know how to create every time this object that not run over the previous to him - because I will use the previous when this dialog will kill.

I'm thinking if I'll rename this object with else name in the "new", I'll save the previous object.

How can I set a different names?

I tried this, but it's an error:

int index = GlobalTablesProperties.getInstance().getTableLevel();

String tableName ="table";

tableName += index;

MyTable tableName =new MyTable();

myDialog.add(tableName .getScrollTable());

[826 byte] By [yael800a] at [2007-11-26 15:08:50]
# 1
I have no idea what you want. A Map or an array maybe?
CeciNEstPasUnProgrammeura at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 2
How cane I sel a diffrent name to object?I don't want to save all this object in a Array
yael800a at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 3
> How cane I sel a diffrent name to object?Did you look up Maps?
CeciNEstPasUnProgrammeura at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 4
I don't want to save this in eny map/array/listI just want to creat every time this object..AA you mean, that I can add to map<Integer, MyTable>?
yael800a at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 5
> I don't want to save this in eny map/array/list> I just want to creat every time this object..> AA you mean, that I can add to map<Integer, MyTable>?Yes
kajbja at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 6
So what is the difrent between save in map or save in List<MyTask> listMyTaskData = new ArrayList<MyTask>();this list is not goog to me because my table prvidet and dataTable is disappire.
yael800a at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 7

> So what is the difrent between save in map or save in

>

> > List<MyTask> listMyTaskData = new

> ArrayList<MyTask>();

>

> this list is not goog to me because my table prvidet

> and dataTable is disappire.

You have a bug which isn't related to the list or map, you have an error in your code.

Kaj

kajbja at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...
# 8

How can I debug in eclips the provider, dataTable...that in the List that have the objects of MyTable (in MyTable I creat every time new provider).

this list<MyTable > put in singleton class, so if I debug' I can't see what have in all the List.

Do you have a link that I can lern how to debug over then basic debug?

yael800a at 2007-7-8 8:59:17 > top of Java-index,Java Essentials,Java Programming...