Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.help Subject: Re: Disposing of Objects? Date: Tue, 15 Nov 2011 12:51:52 -0800 Organization: A noiseless patient Spider Lines: 38 Message-ID: References: <752b3c45-6455-4f52-8cf8-d2ba7714b51f@p16g2000yqd.googlegroups.com> <14847360.425.1321373842152.JavaMail.geo-discussion-forums@prgt40> <86fef440-0898-4ff1-90f2-ba076f524818@j10g2000vbe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 15 Nov 2011 20:51:55 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="26921"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/TElFzD2oM4bwkwxsW6DrlA6X1SO+voQY=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <86fef440-0898-4ff1-90f2-ba076f524818@j10g2000vbe.googlegroups.com> Cancel-Lock: sha1:xMEpoAOA9fJKfoRuFgrf/sd0swk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:1348 On 11/15/2011 12:15 PM, Davej wrote: > Ok, maybe I need an introduction to the controller. Yeah I think so. Any Google search will help you out with that. > You create a new > desktop application in Netbeans and all you have is the view class. Er, I hope you don't mean literally use the "desktop application" project type from NetBeans. That thing is broken, and frankly seems abandoned by Oracle. Use the regular old "Java Application" to make GUI apps. You'll be much happier. > Button events are handled in routines inside this view class. Thanks. Button events should be handled by a controller, which should be a totally separate object. If you're using GUI builder to make those methods, you might want to use the small little methods to dispatch to another object, your controller. But I think it might be better just to let your controller add an action listener to the button itself, and let the dispatch inside the button handle it. Of course, you'll have to write code to accesses the buttons action listeners, so it tends to be six of one and half dozen of another for actual code writing. Again, a Google search for MVC will help you out.