emma dawdry

Greenhorn
+ Follow
since Mar 30, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by emma dawdry

The Integer class has its own equals method that overrides objects equals method. The method compares this object to the specified object. The result is true if and only if the argument is not null and is an Integer object that contains the same int value as this object. So it does actually check the value. If you change i2 to 6, false is returned.
25 years ago
In the following code can you tell me why the method has to be static? The corresponding method that uses FileOutputStream does not have to be. Thanks Emma
public static Library open() throws IOException, ClassNotFoundException {
FileInputStream fis = new FileInputStream("library.ser");
ObjectInputStream ois = new ObjectInputStream(fis);
return (Library)ois.readObject();
25 years ago
I have a JList populated with data. When the user has double clicked on one of the items in the list, I need to maniupulate that item. I have implemented the MouseListener which returns an index of the row the user has clicked on. How do I then get the actual data from that row back?
I have used a corresponding linkedlist to store the data displayed in the JList, so that I can search through that using the index returned by the mouse click but this seems a bit long-winded
Thanks
Emma
25 years ago