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 / GUI / May 2004

Tip: Looking for answers? Try searching our database.

File organization - RULES OF THUMB

Thread view: 
Robert - 25 May 2004 17:34 GMT
Hi,

What is a the best way to organize files when programming a java GUI?

Sorry if this is a trivial question but I am rather new to programming
and would like some input from this group.

Right now, I have one large file with the frame, panels, widgets and
events. It's cumbersome to me. I think there is a better way to
separate these into individual files.

Does anyone have any quick and easy rules of thumb for organizing a
large window programmed in Java Swing?

Thanks,
RM
Roedy Green - 25 May 2004 17:57 GMT
>Does anyone have any quick and easy rules of thumb for organizing a
>large window programmed in Java Swing?

Organise it by panels. Each panel extends JPanel and is a separate
class.

This tends to make hunks of it reusable.

e.g. a date selecting panel.

Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

SZDev - Slash - 29 May 2004 18:12 GMT
> Hi,
>
[quoted text clipped - 9 lines]
> Does anyone have any quick and easy rules of thumb for organizing a
> large window programmed in Java Swing?

Make each panel a separate class and don't put components others than panels
in the JFrame, if possible encapsulate the functionality of them.

Don't use THIS for event listeners, make event listeners in separate classes
to allow reuse and registry on different components.

> Thanks,
> RM

SZDev . Slash


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.