Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: @java.lang.DontOverride Date: Wed, 14 May 2014 10:18:32 -0700 Organization: A noiseless patient Spider Lines: 15 Message-ID: References: <1K5cv.7545$s87.2913@fx11.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 14 May 2014 17:18:34 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="8958"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1k6qpmq1SSrRKSPkgazfO2Wsl4YO2ftI=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: Cancel-Lock: sha1:S9MKPafsHwDkN/PxoPYhehdpq44= Xref: csiph.com comp.lang.java.programmer:28474 On 5/14/2014 10:12 AM, Sarah Connor wrote: > Alternatively ... if your non-component logic has to do with some program > state that the component displays and/or allows the user to manipulate, > then you should probably separate it out into a model object and make the > JComponent subclass a view object, similar to the existing ListModel and > various list controls (JList, JComboBox, ...). > This is what I would prefer. MVC is neither composition nor inheritance. It just makes separate classes which aren't related and have no knowledge of each other. This is vastly superior in many cases.