D
Digital Puer
I have a custom JDialog that is supposed to return several pieces
of data from the user. From the Java tutorial, I learned that one
good way is to have the JDialog provide accessor methods to
return the data.
Question:
Suppose I have already called the accessor methods to get back, say,
an int, an Integer, and a Vector. Then I call JDialog's dispose().
I am not sure about the return-by-value semantics of the above
types, so I do not know if the data will still be valid. Would I
have to do some kind of cloning??
e.g.
MyJDialog dia = new MyJDialog(...);
int int1 = dia.get_int();
Integer int2 = dia.get_Integer();
Vector vec = dia.get_vector();
dia.dispose();
// ---> will int1, int2, and vec still be valid here?
of data from the user. From the Java tutorial, I learned that one
good way is to have the JDialog provide accessor methods to
return the data.
Question:
Suppose I have already called the accessor methods to get back, say,
an int, an Integer, and a Vector. Then I call JDialog's dispose().
I am not sure about the return-by-value semantics of the above
types, so I do not know if the data will still be valid. Would I
have to do some kind of cloning??
e.g.
MyJDialog dia = new MyJDialog(...);
int int1 = dia.get_int();
Integer int2 = dia.get_Integer();
Vector vec = dia.get_vector();
dia.dispose();
// ---> will int1, int2, and vec still be valid here?