UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

When to use lightweight and heavyweight components?

Asked by Last Modified  

4 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Senior Software Engineer

All Swing components are so-called "lightwight" components because they are written in java. If for example you run Swing application and try to analyze it using UI analyzing tool (e.g. WinSpy in windows) you see only one element: the window (JFrame) itself. All other components are drawn from OS point...
read more
All Swing components are so-called "lightwight" components because they are written in java. If for example you run Swing application and try to analyze it using UI analyzing tool (e.g. WinSpy in windows) you see only one element: the window (JFrame) itself. All other components are drawn from OS point of view. Heavyweight API - AWT uses portable elements provided by OS. Since java must be portable among various operating system AWT is very limited. It implements only the minimal subset of screen elements supported by all platforms. However the AWT elements are mapped directly to the appropriate platform elements, so UI discovery tool will see them. These elements are named "heavy weight". read less
Comments

Trainer

1. Heavy weight components are always Rectangle in shape while light weight may or may not. 2. Heavy weight components borrows the native screen to paint their components while light weight render their components by their own screen painting APIs. 3. They differ from z-indexing to each other,...
read more
1. Heavy weight components are always Rectangle in shape while light weight may or may not. 2. Heavy weight components borrows the native screen to paint their components while light weight render their components by their own screen painting APIs. 3. They differ from z-indexing to each other, heavy weight components are always displayed at the top of all lightweight components. 4. Light weight components are faster in response and performance. read less
Comments

Big Data Expert

Lightweight rendering mode works great if you need a true lightweight Swing/JavaFX component that allows displaying modern HTML5/JavaScript/CSS web pages in your Java application. You can make this lightweight component semitransparent, display other components on top of it, put it into JLayeredPane...
read more
Lightweight rendering mode works great if you need a true lightweight Swing/JavaFX component that allows displaying modern HTML5/JavaScript/CSS web pages in your Java application. You can make this lightweight component semitransparent, display other components on top of it, put it into JLayeredPane or JInternalFrame, get notifications about mouse and keyboard events, etc. Heavyweight (GPU-accelerated) rendering mode works much faster compared to lightweight rendering mode. Rendering performance is the same as in Google Chrome. You can display full screen video or HTML5 animation with 60fps. Compared to lightweight rendering mode, CPU and memory usage is much smaller, because web page's content is rendered via GPU. read less
Comments

Computer Trainer

A heavyweight component relies on native code for its visual representation so it is drawn by the underlying operating system. Heavyweight components are those defined in the java.awt package A lightweight component does not rely on native code - it is implemented entirely in Java. This means that a...
read more
A heavyweight component relies on native code for its visual representation so it is drawn by the underlying operating system. Heavyweight components are those defined in the java.awt package A lightweight component does not rely on native code - it is implemented entirely in Java. This means that a lightweight componet is entirely portable. One consequence of the difference between heavyweight and lightweight components is that mixing them in the same application can cause trouble because they are drawn in different ways. You should avoid mixing them. read less
Comments

View 2 more Answers

Related Questions

Should we learn DBMS and RDBMS without any Java training?
java or i can say any programming language is not required to learn DBMS or RDBMS
Karthik
0 0
6
How do people become Java programmers?
Before you become a Java programmer, it's important that you earn an education and learn how to code using Java. While some programmers learn how to use Java on their own, you can learn it much faster...
Rishav
0 0
5
Why is finally introduced in Java?
Finally is introduced in Java to do the code clean up or if you wants to perform some operation irrespective of whether the code throws an Exception or not.
Agastya
What are Access Specifiers in Java?
There are no access specifiers in java as like in c++. Now you can think that, public, private protected and default are what all these. These all called as access modifiers. Everywhere these four...
Kadar
0 0
9
What is a complete list of topics of Core Java and topics of Advanced Java?
Core Java I. Introduction 1. Why Java 2. Paradigms 3. Diff b/w Java & Other (C,C++) 4. Java history 5. Java features 6. Java programming format 7. Java Tokens 8. Java...
Chandramami
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Mastering in Java Programming
Core java topics What is Java?Execution Model Of JavaBytecodeHow to Get Java?A First Java ProgramCompiling and Interpreting ApplicationsThe JDK Directory StructureUsing Eclipse Data types and Variables What...

Easy way to remember Java keyword.
ACCESS MODIFIER ACCESS SPECIFIER abstract, assert, const, final, native, static, strictfp, super, synchronized, this, transient, void, volatile public, private, protected, default DATA...

Rohit Deshbhratar

1 0
0

Importance of Constructor's Visibility.
While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think...
M

On the Job training is always best
On the job training always provides an opportunity to learn the best industry practices. While you work on real time you would encounter many challenges that will force you to learn many new things. Class...
M

Class and Objects in Java
Class is a template or a blueprint which is used to describe an object. On other hand Object is a reference of a class which follows all the stuff written inside the class. How about taking the whole tour in the following video

Recommended Articles

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more