post your comment   print   send to a friend
Rate:   0% | Views: 227
Question categories:  Java

How do Netscape Browsers behave with Java Foundation Classes (JFC)?

 Java Foundation Classes (JFC) is a new graphic framework developed through a collaboration of Sun, Netscape and IBM. It is a mixture of Abstract Window ToolKit (AWT) and Internet Foundation Classes (IFC), with some improvements. However, this new framework has some problems within Netscape browsers: Applets must extend JApplet class instead of Applet class.

The JApplet class is slightly incompatible with java.applet.Applet. JApplet contains a JRootPane as its only child. The contentPane should be the parent of any children of the JApplet. This is different than java.applet.Applet. For example, to add a child to an java.applet.Applet you would write:

applet.add(child);

However using JApplet, you need to add the child to the JApplet's contentPane instead:

applet.getContentPane().add(child);

The same is true for setting LayoutManagers, removing components, listing children, etc. All these methods should normally be sent to the contentPane() instead of the JApplet itself. The contentPane() will always be non-null.

JFC is packed in several JAR files: swing.jar, windows.jar, motif.jar, etc., and usually, you need more than a single one in your developments. Netscape only supports multiple JAR file in the archive HTML tag in 4.0.5. For previous versions, you must extract all the files and create a new JAR archive with all the resources.

Finally, there is a known problem with the window refresh. At times you may need to minimize the browser or move the cursor over it to refresh the applet. JavaSoft has said they are working around this problem. (You can read README.TXT file which came in the Swing package.)

To avoid these problems, there are two solutions: use the Project Java Activator EarlyAccess3 plug-in; or, wait for the OpenJava API release.

0
Customer Feedback
Rate:   0% | Views: 227 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Domain Name Registration | Business Web Hosting    Back to serch results
Browse the Base
Knowledge Base
Web Design
  Do It Yourself
    Java
Messages
Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. How do I access Servlets or CGI programs from Java?
 
2. My applet computes its window size. Can I resize it in the browser?
 
3. How do I communicate between my applets in the same browser?
 
4. How do I force the browser to reload my Java classes without exiting Navigator?
 
5. Why does my java console show an applet is pruned?
 
Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest