Java Swing Interview Questions with Answer for freshers and experienced

Categories: Interview questions and answers Experienced Freshers Java

Java Swing Interview Questions with Answer for freshers and experienced

 

Q1. What is the difference between a Choice and a List? 

Answer: A Choice is displayed in a compact form that must be pulled down, in order for a user to be able to see the list of all available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items.

 

Q2. What is a layout manager? 

Answer: A layout manager is used to organize the components in a container.

 

Q3. What is the difference between a Scrollbar and a JScrollPane? 

Answer: A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling.

 

Q4. Which Swing methods are thread-safe? 

AnswerThere are only three thread-safe methods: repaint, revalidate, and invalidate.

 

Q5. Name three Component subclasses that support painting. 

AnswerThe Canvas, Frame, Panel, and Applet classes support painting.

 

Q6. What is clipping? 

AnswerClipping is defined as the process of confining paint operations to a limited area or shape.

 

Q7. What is the difference between a MenuItem and a CheckboxMenuItem? 

AnswerThe CheckboxMenuItem class extends the MenuItem class and supports a menu item that may be either checked or unchecked.

 

Q8. How are the elements of a BorderLayout organized? 

AnswerThe elements of a BorderLayout are organized at the borders (North, South, East, and West) and the center of a container

 

Q9. How are the elements of a GridBagLayout organized? 

AnswerThe elements of a GridBagLayout are organized according to a grid. The elements are of different sizes and may occupy more than one row or column of the grid. Thus, the rows and columns may have different sizes.

 

Q10. What is the difference between a Window and a Frame? 

AnswerThe Frame class extends the Window class and defines a main application window that can have a menu bar.

Top articles
Servlet interview questions and answers for experienced Published at:- Spring Interview Questions and Answer for Experienced Published at:- Spring Boot Features for Java Developers (2022) Published at:- Detecting build version and time at runtime in Spring Boot Published at:- AWS Interview Questions Answers for Freshers and Experienced Published at:- Laravel Interview Question Answer for Freshers and Experienced Published at:- Splunk Interview Questions and Answers for freshers and Experienced Published at:- IOS Interview Questions for freshers and experienced Published at:- Red Hat Interview Question Answers for Freshers and experienced Published at:- Python Interview Question and Answer Published at:- Basic Indian History General Knowledge Question and Answer (Quiz) Published at:- AWS Interview Question and Answer for freshers and Experienced Published at:- Angular 13 interview Question and Answer Published at:- Question bank for Limited Departmental Competitive Examination (LDC) examination Published at:- Question bank for Limited Departmental Competitive Examination (LDC) examination (Set 2) Published at:- Question bank for Limited Departmental Competitive Examination (LDC) examination (Set 3) Published at:- Limited Departmental Competitive examination (LDC) examination (Water supply) Published at:- Interview Question and answer for Limited Departmental Competitive Examination Published at:- Question bank for Limited Departmental Competitive Examination (LDC) examination (Soil mechanics) Published at:- Question bank for Limited Departmental Competitive Examination (LDC) examination Sanitary Engineering Published at:- Interview Question for Limited Departmental Competitive Examination (LDC) Principles of Surveying Published at:- Interview MCQ question for railways New Lines, Doublings & Gauge Conversion Projects Published at:- MCQ Interview Question and answer for Railway Station and Passenger Amenities Published at:- Interview Question and Answer for Railway preparation Published at:- PHP MCQ Quiz Question with Answer Published at:- PHP MCQ Quiz Question with Answer (set 2) Published at:- Angular MCQ Quiz Question and Answer Published at:- Angular MCQ Quiz Question and Answer Set 2 Published at:- Java General Interview Questions and Answer Published at:- Java Threads Interview Question and Answer for experienced Published at:- Java Collections Interview Question and Answer for freshers and experienced Published at:- Garbage Collector in Java Frequently Asked Questions and Answers Published at:- Difference between Exception and Error in java Exception Handling Published at:- Java Applets Interview Questions with Answer Published at:- Java Swing Interview Questions with Answer for freshers and experienced Published at:- Java Database Connectivity (JDBC) Interview Question and answer Published at:- Remote Method Invocation (RMI) Interview Question and Answer Published at:- Jakarta Server Page (JSP) programming language Interview Question and Answer Published at:- Write a program in Java to display the first 10 terms of the following series: 10, 20, 30, 40, …….. Published at:- Write the program in Java to display the first ten terms of the following series: 1, 4, 9, 16, Published at:-
R4Rin Team
The content on R4Rin.com website is created by expert teams.