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

Tip: Looking for answers? Try searching our database.

logging

Thread view: 
joxy - 16 Jul 2007 15:35 GMT
Hello, how is that i can create an object which can be used by the
other classes in my project, so they can use the logging service...
since I have used many classes extending JFrame, and JInternalFrame, i
cannot extend from any other class else... so what would you recommend
to me? using interfaces? (i need implemented code)
Ian Wilson - 16 Jul 2007 16:35 GMT
> Hello, how is that i can create an object which can be used by the
> other classes in my project, so they can use the logging service...
> since I have used many classes extending JFrame, and JInternalFrame, i
> cannot extend from any other class else... so what would you recommend
> to me? using interfaces? (i need implemented code)

I'd pass an instance as a parameter to the constructors of the many
classes. Or to a method written to accept it.

e.g.

MyObject myObj = new MyObject();

MyClass1 mc1 = new MyClass1(myObj);

MyClass2 mc2 = new MyClass2();
mc2.setMyObject(myObj);


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.