Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

4 simple Swing questions

Thread view: 
Andy - 15 Dec 2007 10:59 GMT
Gurus, can you please help me out with these simple questions..Thanks
in advance

(a) A class that never needs a listener (i.e., that generates no
events).
Answer:

(b) A class that requires implementation of five listener methods.
Answer: MouseListener

(c) A class used only for output, never for input.
Answer:

(d) A class that generates events from more than one event class.
Answer:

(e) A class with two different listener interfaces.
Answer:
Andrew Thompson - 15 Dec 2007 11:07 GMT
>Gurus, can you please help me out with these simple questions..Thanks
>in advance

Andy, can you please do your own homework and cease
wasting our friggin' bandwidth.  RTFM.  TIA.

Signature

Andrew Thompson
http://www.physci.org/

Ujjal Pathak - 15 Dec 2007 13:51 GMT
Andrew, you sir, inspired me. May you rock as usual.

(a) A class that never needs a listener (i.e., that generates no
events).
Answer: ImageIcon

(b) A class that requires implementation of five listener methods.
Answer: MouserListener

(c) A class used only for output, never for input.
Answer: showMessageDialog

(d) A class that generates events from more than one event class.
Answer: JRadioButton - ActionEvent and ItemEvent

(e) A class with two different listener interfaces.
Answer: MouseEvent
Lew - 15 Dec 2007 18:35 GMT
> Andrew, you sir, inspired me. May you rock as usual.

He inspired you to do someone else's homework?

Signature

Lew

Roedy Green - 15 Dec 2007 18:44 GMT
On Sat, 15 Dec 2007 05:51:38 -0800 (PST), Ujjal Pathak
<ujjalpathak@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>(a) A class that never needs a listener (i.e., that generates no
>events).
>Answer: ImageIcon

You stole that foolish newbie's chance at an education.  

It is a bit like interfering with the physical therapy of a someone
recovering from a coma with emaciated legs. They NEED the exercise,
even if they are not keen just now to do it.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Joe Attardi - 16 Dec 2007 04:01 GMT
> (c) A class used only for output, never for input.
> Answer: showMessageDialog

showMessageDialog() is a method, not a class... :)
Lew - 16 Dec 2007 09:48 GMT
>> (c) A class used only for output, never for input.
>> Answer: showMessageDialog
>
> showMessageDialog() is a method, not a class... :)

Oh, dear, does that mean homework seekers will still have to think, and do
research to corroborate what the read?

Signature

Lew

Roedy Green - 15 Dec 2007 18:42 GMT
On Sat, 15 Dec 2007 02:59:18 -0800 (PST), Andy
<andy.rockford@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>Gurus, can you please help me out with these simple questions..Thanks
>in advance
[quoted text clipped - 14 lines]
>(e) A class with two different listener interfaces.
>Answer:

These are the sort of question some addled professor would concoct.
The answers have no practical value.  

Their intent, I presume, it to get you to wander through the Javadoc
getting generally familiar with it, a sort of treasure hunt to as an
excuse to tour the village.  Others answering those questions would
defeat their rather weak purpose.

see http://mindprod.com/jgloss/homework.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.