Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1348

Re: Disposing of Objects?

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 <j9ujdb$q99$1@dont-email.me> (permalink)
References <752b3c45-6455-4f52-8cf8-d2ba7714b51f@p16g2000yqd.googlegroups.com> <j9tv9q$dvi$1@dont-email.me> <14847360.425.1321373842152.JavaMail.geo-discussion-forums@prgt40> <a6100ea3-c1bd-450e-9750-1277fc00c8bd@w1g2000vba.googlegroups.com> <EWxwq.27362$Us1.15966@newsfe16.iad> <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

Show key headers only | View raw


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.


Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Disposing of Objects? Davej <galt_57@hotmail.com> - 2011-11-15 06:59 -0800
  Re: Disposing of Objects? markspace <-@.> - 2011-11-15 07:08 -0800
    Re: Disposing of Objects? Lew <lewbloch@gmail.com> - 2011-11-15 08:17 -0800
      Re: Disposing of Objects? Davej <galt_57@hotmail.com> - 2011-11-15 09:56 -0800
        Re: Disposing of Objects? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-15 10:10 -0800
          Re: Disposing of Objects? Davej <galt_57@hotmail.com> - 2011-11-15 12:15 -0800
            Re: Disposing of Objects? markspace <-@.> - 2011-11-15 12:51 -0800
        Re: Disposing of Objects? Lew <lewbloch@gmail.com> - 2011-11-15 13:00 -0800
        Re: Disposing of Objects? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-15 21:59 -0500
          Re: Disposing of Objects? markspace <-@.> - 2011-11-15 19:13 -0800
            Re: Disposing of Objects? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-15 22:32 -0500
  Re: Disposing of Objects? Davej <galt_57@hotmail.com> - 2011-11-15 08:08 -0800
    Re: Disposing of Objects? markspace <-@.> - 2011-11-15 08:32 -0800
    Re: Disposing of Objects? Lew <lewbloch@gmail.com> - 2011-11-15 12:57 -0800
  Re: Disposing of Objects? Roedy Green <see_website@mindprod.com.invalid> - 2011-11-16 06:23 -0800

csiph-web