CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies
Java Swing Programing Interview Questions & Answers - Learning Mode
COOLINTERVIEW.COM J2EE INTERVIEW QUESTIONS JAVA SWING PROGRAMING INTERVIEW QUESTIONS QUESTIONS & ANSWERS - LEARNING MODE

Java Swing Programing Interview Questions & Answers - Learning Mode

Java Swing first programs. Java offers two standard libraries for graphical user interface (GUI). The first one is the simpler java.awt package, which contains classes to create windows (java.awt.Window), buttons (java.awt.Button), textfields (java.awt.TextField), and so on. Swing Framework contains a large set of components which provide rich functionalities and allow high level of customization. All these components are lightweight components. They all are derived from JComponent class. It supports the pluggable look and feel.

Try Java Swing Programing Interview Questions & Answers - Exam Mode

1 2 Next

Sort By : Latest First | Oldest First | By Rating

Java Swing Programing Interview Questions & Answers - Learning Mode
Try Java Swing Programing Interview Questions & Answers - Exam Mode
Question: What is the What is the difference between invokeAndWait() and invokeLater()? ?

Answer: invokeAndWait() method in swing is synchronous. It blocks until Runnable task is complete. InvokeLater() method in swing is asynchronous. It posts an action event to the event queue and returns immediately. It will not wait for the task to complete Source: CoolInterview.com
Question: Which method is used by the applet to recognize the height and width?

Answer: getParameters()
Method is used by the applet to recognize the height and width. Source: CoolInterview.com
Question: Which method of the Component class is used to set the position and size of a component?

Answer: setBounds
Method of the Component class is used to set the position and size of a component. Source: CoolInterview.com
Question: What are the differences between Swing and AWT?

Answer: AWT is heavy-weight components, but Swing is light-weight components. AWT is OS dependent because it uses native components, But Swing components are OS independent. We can change the look and feel in Swing which is not possible in AWT. Swing takes less memory compared to AWT. For drawing AWT uses screen rendering where Swing uses double buffering. Source: CoolInterview.com
Question: What is Java Swing?

Answer: Swing is a GUI toolkit for Java. It is one part of the Java Foundation Classes (JFC). Swing includes graphical user interface (GUI) widgets such as text boxes, buttons, split-panes, and tables.
Swing widgets provide more sophisticated GUI components than the earlier Abstract Window Toolkit. Since they are written in pure Java, they run the same on all platforms, unlike the AWT which is tied to the underlying platform's windowing system. Swing supports pluggable look and feel ? not by usin Source: CoolInterview.com
Question: What is an event in Swing?

Answer: Changing the state of an object is called an event. Source: CoolInterview.com
Question: What are the advantages of the event-delegation model over the event-inheritance model?

Answer: Event-delegation model has two advantages over event-inheritance model. a)Event delegation model enables event handling by objects other than the ones that generate the events. This allows a clean separation between a component's design and its use. b)It performs much better in applications where many events are generated. This performance improvement is due to event-delegation model does not have to be repeatedly process unhandled events as is the case of the event-inheritance. Source: CoolInterview.com
Question: What is double buffering ?

Answer: Double buffering is the process of use of two buffers rather than one to temporarily hold data being moved to and from an I/O device. Double buffering increases data transfer speed because one buffer can be filled while the other is being emptied. Source: CoolInterview.com
Question: What is AWT?

Answer: AWT stands for Abstract Window Toolkit. AWT enables programmers to develop Java applications with GUI components, such as windows, and buttons. The Java Virtual Machine (JVM) is responsible for translating the AWT calls into the appropriate calls to the host operating system. Source: CoolInterview.com
Question: Why should any swing call back implementation execute quickly?

Answer: Callbacks are invoked by the event dispatch thread. Event dispatch thread blocks processing of other events as long as call back method executes. Source: CoolInterview.com
Question: Which method is used for setting security in applets?

Answer: setSecurityManager()
Method is used for setting security in applets Source: CoolInterview.com
Question: What is an event and what are the models available for event handling?

Answer: Changing the state of an object is called an event. An event is an event object that describes a state of change. In other words, event occurs when an action is generated, like pressing a key on keyboard, clicking mouse, etc. There different types of models for handling events are event-inheritance model and event-delegation model Source: CoolInterview.com
Question: What is a layout manager?

Answer: A layout manager is an object that is used to organize components in a container. Source: CoolInterview.com
Question: Which containers use a border Layout as their default layout in swing?

Answer: The window, Frame and Dialog classes use a border layout as their default layout. Source: CoolInterview.com
Question: Which containers use a FlowLayout as their default layout?

Answer: The Panel and Applet classes use the FlowLayout as their default layout. Source: CoolInterview.com
Question: When we should go for codebase in applet?

Answer: If the applet class is not in the same directory, codebase is used. Source: CoolInterview.com
Question: Which is the best book to start learning Java Swing and JFC?

Answer: No answer available currently.
Question: What is an event handler in swing?

Answer: An event handler is a part of a computer program created to tell the program how to act in response to a specific event. Source: CoolInterview.com
Question: What is clipping?

Answer: Clipping is the process of confining paint operations to a limited area or shape. Source: CoolInterview.com
Question: What is JFC?

Answer: JFC stands for Java Foundation Classes. The Java Foundation Classes (JFC) are a set of Java class libraries provided as part of Java 2 Platform, Standard Edition (J2SE) to support building graphics user interface (GUI) and graphics functionality for client applications that will run on popular platforms such as Microsoft Windows, Linux, and Mac OSX. Source: CoolInterview.com

1 2 Next



India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds