Article View: comp.lang.java
Article #579Rename an object?
From: Scott Saunders
Date: Fri, 24 Mar 2000 00:00
Date: Fri, 24 Mar 2000 00:00
11 lines
1563 bytes
1563 bytes
Can anyone please tell me how to take an object and give it a name using a
string? For example, I have an object of type relation (my own class) called
"rel1", and I want to give it a name like "My relation" so that I can
display this name in a JList instead of the actual object's name ("rel1").
If anyone can help I'd appreciate it. Someone suggested using forname in the
java.lang.class package, but I didn't understand it. I don't know if it is
what I needed anyway. Please could you reply to sc0tt@talk21.com.
Thanks,
Scott
Technical Details
Message-ID:
<8bfoup$eh2$1@news8.svr.pol.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113ae9,af49882d01fb7d16,start X-Google-Attributes: gid113ae9,public X-Google-Thread: fb99b,af49882d01fb7d16,start X-Google-Attributes: gidfb99b,public X-Google-Thread: f5d71,af49882d01fb7d16,start X-Google-Attributes: gidf5d71,public X-Google-Thread: 10a146,af49882d01fb7d16,start X-Google-Attributes: gid10a146,public From: "Scott Saunders" <scott@saunders179.freeserve.co.uk> Subject: Rename an object? Date: 2000/03/24 Message-ID: <8bfoup$eh2$1@news8.svr.pol.co.uk> X-Deja-AN: 601739855 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.3825.400 X-Complaints-To: abuse@theplanet.net X-Trace: news8.svr.pol.co.uk 953902873 14882 62.137.42.156 (24 Mar 2000 13:01:13 GMT) Organization: Customer of Planet Online X-MSMail-Priority: Normal Reply-To: "Scott Saunders" <scott.saunders@bigfoot.com> NNTP-Posting-Date: 24 Mar 2000 13:01:13 GMT Newsgroups: comp.lang.java,comp.lang.java.help,comp.lang.java.programmer,cz.comp.lang.java