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 / August 2007

Tip: Looking for answers? Try searching our database.

NetBeans MVC support?

Thread view: 
Consty - 03 Aug 2007 10:00 GMT
I'm curious how one deals with large GUI based Swing applications
using NetBeans?  Typically from my understanding you use a model-view-
controller technique to separate it all to easily have Frames talk to
other Frames and etc.  From messing around in NetBeans it doesn't seem
like you can do that.  You can't change generated code either.  The
only way I could really seem to do it was to declare a reference to
the other Frame I wanted and pass that into a constructor or just
allocate it within the current frame and call setVisible().  This
isn't the right way I believe and I'm sure there is a way around this
or something I'm not seeing.  I'm only interested in figuring out how
to do it with NetBeans and not manually without NetBeans.  I know you
can write the code yourself without it.  Thanks in advance!
Eric Sosman - 03 Aug 2007 13:36 GMT
> I'm curious how one deals with large GUI based Swing applications
> using NetBeans?  Typically from my understanding you use a model-view-
[quoted text clipped - 8 lines]
> to do it with NetBeans and not manually without NetBeans.  I know you
> can write the code yourself without it.  Thanks in advance!

    Write your model class, and then specify an instance of it
in the "model" field of the property sheet of the JWhatever.

    Two JFrames (or in Jeneral, two JWhats) usually shouldn't
talk to each other anyhow.  Instead, they should talk to the
same model instance: frame F1 updates some value in the model,
and F2 learns about it because it's listening for model changes.
F2 never knows (nor should it need to know) that the change was
caused by something F1 did; as far as F2 is concerned, the model
might have decided to make the change on its own initiative,
after a timer expired or something.

Signature

Eric Sosman
esosman@ieee-dot-org.invalid



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



©2008 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.