Home > Java > javaTutorial > body text

What does component mean in java?

藏色散人
Release: 2020-09-09 16:57:10
Original
13259 people have browsed it

Components represent various graphical entities that can be displayed on the screen, while components in Java are abstract concepts and are actually classes, such as components "servlet", "jsp" and "javabean" etc. are all java classes.

What does component mean in java?

This article mainly introduces to you what components are in Java. I hope it will be helpful to friends in need!

Components represent various graphical entities that can be displayed on the screen. A component is an object of a Component subclass. As we have seen, the JFrame window is a component, but does not contain other subclasses.

To put it simply, java is actually a class.

Components are just abstract concepts. In layman’s terms, some classes that comply with certain specifications are combined to form a component. It can provide certain functions.

Take J2EE as an example, servlets, jsp, javabeans, and ejb are all components. But in fact they are all classes, but they have their own special regulations.

For example, take a javabean:

javabean is also a class, but if your class wants to become a javabean, you must add variables (such as xxx) in your class. Two functions, getXxx() and setXxx(), and there must be a parameterless constructor in the class.

With these is JAVABEAN.

You have to ask why there are these regulations. At present, we can only say that if components want to use each other, there must be a specification to restrict them. You will understand it better when you have more contact with me.

Related recommendations: "Java Tutorial"

The above is the detailed content of What does component mean in java?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template