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 / First Aid / March 2005

Tip: Looking for answers? Try searching our database.

In Java

Thread view: 
csudha - 15 Mar 2005 14:20 GMT
Hi!
  I've 3 doubts.Can you please explain it with some example.

1.What's the difference between static and an object? why we are using
objects for creating memory than static?
2. In Java FlowLayout is used in Aplets to organize components. Which
method is used for Applications.
3. How can I show my text in the status Bar in Applet and how can i
get the status Bar.

Thanks,
Sudha.
Sameer - 15 Mar 2005 19:55 GMT
1. A static method is always associated with the class i.e. we do not
need to create objects of the class to use the static methods. The
static methods are called using the general syntax:
ClassName.StaticMethodName.
Note that there is no instance name.
The examples of static methods can be found in the Java API. Some of
them are..
Math.abs, Math.cos etc.-
Usually static methods are general purpose methods related to the
class.
Are you still confused about static keyword?

2.If you are using Frame then the default layout is BorderLayout. Just
use the method setLayout to apply different layouts. You may use
different layouts depending on your need.

3. Use showStatus(String) method of Applet class. A brief description
is given below.

public void showStatus(String msg)
Requests that the argument string be displayed in the "status window".
Many browsers and applet viewers provide such a window, where the
application can inform users of its current state.
Parameters:
msg - a string to display in the status window.

-sameer75@g


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.