Results 1 to 4 of 4
  1. #1
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    258
    Rep Power
    2

    Default Quick Theroy questoin for upcoming final

    Hey guys im doing a software first year final this week im pretty much ok with everything in the exam UML and such is all fine.

    I have one question which threw me off a bit:

    Give one advantage and one disadvantage of having a separate
    ActionListener object (to having the JPanel in which the JButton is placed
    doing its own listening).


    This question is only worth 5 marks so a couple of lines for each advantage/disadvantage is more than enough

    I always thought it was wise to use a separate listener, rather than have the JPanel listen to everything, Because its more complaint to the MVC Deisgn.


    How would you guys answer this?
    Last edited by monkeyjr97; 05-10-2013 at 01:32 AM.

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Quick Theroy questoin for upcoming final

    You could talk about the difference between is-a and has-a relationships, and the pros and cons of extending JFrame.
    Get in the habit of using standard Java naming conventions!

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,945
    Rep Power
    19

    Default Re: Quick Theroy questoin for upcoming final

    !JFrame.
    They're talking about JPanel.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Quick Theroy questoin for upcoming final

    So they are. Well then, they can talk about the pros and cons of extending JPanel.
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. Final int
    By Fireking in forum New To Java
    Replies: 12
    Last Post: 06-22-2013, 05:44 PM
  2. Please lead me in the right direction for an upcoming project.
    By huntert in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-09-2012, 03:01 PM
  3. Interface questoin
    By BobswYourUcle in forum New To Java
    Replies: 2
    Last Post: 07-23-2011, 01:16 AM
  4. [SOLVED] is final class members are also final ?
    By haoberoi in forum New To Java
    Replies: 4
    Last Post: 11-10-2008, 03:01 PM
  5. Poi 3.0-final
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-22-2007, 07:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •