Top 25+ Advanced Java Swing Interview Questions 2019-2020 - 1
What is Event Driven Thread (EDT) is Swing?
Event Driven Thread or EDT is a special thread in Swing and AWT. Event Driven Thread is used to draw graphics and listen for events in Swing.
You will get a bonus point if you able to highlight that time consuming operations like connecting to database, opening a file or connecting to network should not be done on EDT thread because it could lead to freezing GUI because of blocking and time consuming nature of these operations instead they should be done on separate thread and EDT can just be used o spawn those thread on a button click or mouse click.
What are differences between Swing and AWT?
There is couple of differences between swing and AWT.
AWT component are considered to be heavyweight while Swing component are lightweights.
Swing has plug gable look and feel.
AWT is platform dependent same GUI will look different platform while Swing is developed in Java and is platform dependent.
What is the difference between a Window and a Frame?
The Frame extends Window to define a main application window that can have a menu bar.
What is the difference between the paint() and repaint() methods?
The paint() method supports painting via a Graphics object.
The repaint() method is used to cause paint() to be invoked by the AWT painting thread.
How can a GUI component handle its own events?
A component can handle its own events by implementing the required event listener interface and adding itself as its own event listener.
7000+ TNPSC Group 1, 2, 4, VAO Indian Economy Study Materials Pdf More
7000+ Gate Computer Science Engineering Previous Year Questions More
7000+ Fill in the Blanks with Suitable Homonyms More
7000+ Fill in the Blanks with Suitable Homophones More
Power Semiconductor Device and Integrated Circuits MCQ Questions Pdf More
Preposition Online Test for Competitive Exams More
100+ GATE Petroleum Engineering Previous Year Papers with Solutions More
1000+ Mathematics Aptitude Questions and Answers More
Advanced Java Interview Questions and Answers More
1000+ Latest Computers & Technology Quiz 2020-2021 More