What does "J" mean in a japplet?

What does "J" mean in a japplet?

+3
source share
4 answers

When San started working on Swing, they had things like javax.swing.Button. This caused problems for programs that use java.awt.Button. The main problem, if I remember correctly, was that the compiler error messages were confusing.

Sun resolved the prefix of all Swing components with J to remove this problem.

Originally called swing JFC - Java Foundation Classes ... presumably J came from this.

Netscape 's IFC became the foundation for JFC ... the same team developed both.
The team moved from Netscape to Sun.
J was there when I first contacted the licensees (I was the person who got the drop in my company).

JClass BWT and IFC (which became JFC, which became Swing) were also incompatible ... " Can I use BWT controls in IFC? "

Edit: reply to a message from a Swing team member ...

"The names un-J'd have already been adopted by AWT, and we found it useful to use a common prefix to distinguish" components "from other classes in a package."

The already accepted part corresponds to what I said about the compiler, but does not confirm it.

+13
source

"J" was first released by the KL Group (now quest.com) , whose BWT revolution forms the basis of today's advanced AWT called Swing / JFC.

So, he comes from ancestor today KL JClass :
( Not so, according to TofuBeer's Answer . I leave the rest as a community response because it details JClass, but “J” may not come from integrating their library into Swing.)

JClass SwingSuite , a new set of extensions and enhancements for Swing in the Sun Development Kit (JDK (TM) version 1.2): It coincides with Sun's announcement of the availability of JDK 1.2, made today during the Java (SM) Business Expo (SM) in New York.

JClass JavaBeans are available in many popular Java-IDEs and are the main components used by professional and corporate developers around the world.
JClass 3.6 includes versions of "J" that work with the javax.swing package, which allows you to develop and deploy with JDK 1.2 today .


JClass 3.6 to 4.0 Migration Guide and KL Group Releases Swing Update for JClassLine (March 1998) :

To match the different types of environments that Java developers can use, we have developed versions of our JClass products that can be used for specific Java development kits (JDKs). The following are the differences between the different versions:

  • "J" version: uses JDK 1.1 + Swing 1.1 (recommended JDK 1.1.8 + Swing 1.1.1)
  • Version "K": uses Java 2 (JDK 1.2.2 recommended)

JClass 3.6 and previous versions used a slightly different letter scheme, which looks like this:

  • "T" version: uses the JDK 1.0.2 API and implements "transitional" JavaBeans
  • "Unlettered" version: uses JDK 1.1.x and includes a full JavaBean implementation
  • Version "S": uses JDK 1.1 / Swing 1.0.3
  • "J" version: uses JDK 1.2 or JDK 1.1 with Swing 1.1

A bit of general context:

From Core Java Applet and JApplet :

AWT (Abstract Windowing Toolkit) was part of Java from the very beginning, but almost from the very beginning it was clear that AWT was not powerful enough or flexible enough to write complex complex applications.

This does not stop him from being useful - especially for applets that are usually not as complex as full-blown independent applications.

The Swing GUI library was created to solve AWT issues. With the release of Java version 1.2, Swing has become an official part of Java. (Java versions starting with 1.2 are also called, rather vaguely, "Java 2.")

There are still good reasons to write AWT-based applets, such as the lack of support in many web browsers for Java 2. However, for now, anyone writing a stand-alone Java graphics application should use Swing.

The classes that make up the Swing library can be found in the javax.swing package. Swing includes the javax.swing.JApplet class , which will be used as the basis for writing applets.

JApplet is actually a subclass of Applet , so JApplets are actually Applets in the usual sense.

However, JApplets has a lot of additional structure in which simple applets do not . Because of this structure, the JApplet picture is more complex and is processed by the system.

So, when you create a subclass of JApplet , you should not write the paint() method for it. As we will see, if you want to draw a JApplet , you must add a component to the applet that will be used for this purpose. On the other hand, you can and usually should write the init() method to subclass JApplet .

enter image description here

Swing is a large set of components, from very simple ones, such as shortcuts, to very complex ones, such as tables, trees, and text documents in style.
Almost all Swing components come from a single parent named JComponent , which extends the AWT Container class.
Thus, Swing is best described as a layer on top of AWT rather than replacing it.
If you compare it to the AWT component hierarchy, you will notice that for each AWT component there is a Swing equivalent with the J prefix J "
The one exception is the AWT Canvas class, for which JComponent , JLabel or JPanel can be used as a replacement. Many Swing classes do not have AWT counterparts.

+7
source

J stands for Java. The main difference between the JSomeName classes and their "previous" version is that the Js are for use with Swing (or any other graphical toolkit), and the rest are from now on, where only AWT is available.

+1
source

J appears after the convention used in Swing classes.

According to javadoc :

An extended version of java.applet.Applet that adds support for the JFC / Swing architecture

The JFC / Swing architecture is different from the AWT architecture.

There are several differences, but the most significant is that AWT uses native code to render widgets (so SWT ), and Swing is “lightweight” because everything is written using Java.

So the answer to your question

What does "J" mean in a japplet?

This means that the Applet supports the Swing architecture.

I think TofuBeer and VonC are great answers, but they are not addressed (at least directly) to your question. Instead, they continue to explain why J is in the swing components and should not be confused with tons of other Js in front of other classes outside the Sun.

+1
source

All Articles