Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: =?ISO-8859-1?Q?Object=A0message=3F?= Date: Tue, 09 Oct 2012 23:46:15 +0200 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <9621cdc5-4aa4-4057-894f-93ef69915871@googlegroups.com> <4gq778dca0tk3db180c2aou7qd7jkkqta1@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 9 Oct 2012 21:48:14 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="014c81b1a73806fcf41c4af5b0a53ca2"; logging-data="32344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PVdoP3IixCmeUTl8hpYqo" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <4gq778dca0tk3db180c2aou7qd7jkkqta1@4ax.com> Cancel-Lock: sha1:ijvCvGfyYRcEYD4QF7p6vUMdo7w= Xref: csiph.com comp.lang.java.programmer:19209 On 09/10/2012 11:11, Roedy Green allegedly wrote: > On Mon, 8 Oct 2012 12:52:56 -0700 (PDT), bob smith > wrote, quoted or indirectly quoted someone > who said : > >> Can someone tell me why "message" is an Object here in javax.swing.JOptionP= >> ane? >> >> Why isn't it a String? > > In general Object can let you pass any sort of information to > yourself, not just a string. It can be formatted data. The > disadvantage is you must cast it to a String. Not quite, Roedy. Among other things, it can be any JComponent. And that's extremely useful. -- DF.