Top 25+ Advanced Java Swing Interview Questions 2019-2020 - 1
Question: 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.
Question: 2
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.
Question: 3
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.
Question: 4
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.
Question: 5
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.
Samacheer Kalvi Class12 Bio Zoology Evolution Questions More
Samacheer Kalvi 12th Biodiversity & its Conservation Questions More
NEET Human Health and Diseases Questions More
Applications of Biotechnology NEET Questions and Answers Pdf More
Samacheer Kalvi 12th Applications of Biotechnology Questions More
Levels of Organization Multiple Choice Questions & Answers More
1000+ MS DOS Questions and Answers for Competitive Exams More
100+ Physics Electric Charges at Rest Questions Answers More
Advent of Europeans General Knowledge Questions & Answers More
1000+ Advanced Excel Quiz Questions and Answers Pdf More