Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2331

Re: Long delay when using JComboBox.setSelectedIndex() ??

Newsgroups comp.lang.java.help
Date 2012-12-05 16:34 -0800
References <b396252c-b370-413b-963b-97313f83a30f@googlegroups.com> <e11b4b5d-76ae-4eb0-b29a-b5c40ad59937@googlegroups.com> <1f53fcab-243d-47aa-9b17-a1216b1e8138@googlegroups.com> <bc9f2f27-8ee5-41ef-b03c-575939131caa@googlegroups.com> <7uovb8t3p068l0fc39qj7n6ttr237g2k9o@4ax.com>
Message-ID <c3fc1e50-54d6-4c45-b5d4-174aa809f1cb@googlegroups.com> (permalink)
Subject Re: Long delay when using JComboBox.setSelectedIndex() ??
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Roedy Green wrote:
> kedward777... wrote, quoted or indirectly quoted someone who said :
>>Can you show me how to override equals ??
> 
> just write a method that has the same parms [sic] as Object.equals

That is necessary but very far from sufficient.

It has to have the same or compatible signature, not just the same parms.

It should be annotated with '@Override'.

It has to have logic appropriate to the type, so that the semantics of 
'equals()' makes sense.

You also left out the part about having 'hashCode()' match.

Your answer is like telling a newbie, "To write a Java program to do what you're 
asking, just write a class that has the same form as 'Hello, World'." Except for 
being more incorrect.

It also came four hours after an extremely detailed answer with code specific to 
the OP's situation that didn't have these lacunae. 

But thank you for participating anyway.

-- 
Lew

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Long delay when using JComboBox.setSelectedIndex() ?? kedward777@gmail.com - 2012-12-05 09:27 -0800
  Re: Long delay when using JComboBox.setSelectedIndex() ?? kedward777@gmail.com - 2012-12-05 10:08 -0800
    Re: Long delay when using JComboBox.setSelectedIndex() ?? Lew <lewbloch@gmail.com> - 2012-12-05 10:35 -0800
      Re: Long delay when using JComboBox.setSelectedIndex() ?? kedward777@gmail.com - 2012-12-05 10:46 -0800
        Re: Long delay when using JComboBox.setSelectedIndex() ?? Lew <lewbloch@gmail.com> - 2012-12-05 11:31 -0800
        Re: Long delay when using JComboBox.setSelectedIndex() ?? Roedy Green <see_website@mindprod.com.invalid> - 2012-12-05 16:16 -0800
          Re: Long delay when using JComboBox.setSelectedIndex() ?? Lew <lewbloch@gmail.com> - 2012-12-05 16:34 -0800
            Re: Long delay when using JComboBox.setSelectedIndex() ?? Knute Johnson <nospam@knutejohnson.com> - 2012-12-05 16:40 -0800
              Re: Long delay when using JComboBox.setSelectedIndex() ?? Lew <lewbloch@gmail.com> - 2012-12-05 16:58 -0800
            Re: Long delay when using JComboBox.setSelectedIndex() ?? Roedy Green <see_website@mindprod.com.invalid> - 2012-12-06 15:32 -0800
              Re: Long delay when using JComboBox.setSelectedIndex() ?? Lew <lewbloch@gmail.com> - 2012-12-06 18:04 -0800
  Re: Long delay when using JComboBox.setSelectedIndex() ?? Knute Johnson <nospam@knutejohnson.com> - 2012-12-05 16:15 -0800
  Re: Long delay when using JComboBox.setSelectedIndex() ?? Gene Wirchenko <genew@telus.net> - 2012-12-12 18:15 -0800

csiph-web