What is the difference between invokeAndWait() and invokeLater()? ,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
What is the difference between invokeAndWait() and invokeLater()?

The difference between invokeAndWait() and invokeLater():    

> invokeAndWait(): is synchronous. It blocks until Runnable task is complete.
> invokeLater() :is asynchronous. It posts an action event to the event queue and returns immediately. It will not wait for the task to complete .

More interview questions and answers
How you define index document?
How Cell Padding is differ from Cell Spacing?
What do you understand about DOCTYPE in HTML?
Can a class be it\'s own event handler? Explain how to implement this?
How you define CSS?
Why does JComponent have add() and remove() methods but Component does not?
How would you create a button with rounded edges?
What is the difference between the Font and FontMetrics class?
What class is at the top of the AWT event hierarchy?
How we use CSS?
Explain how to render an HTML page using only Swing?
How would you detect a keypress in a JComboBox?
Why should the implementation of any Swing callback (like a listener) execute quickly?
In what context should the value of Swing components be updated directly?
Why would you use SwingUtilities.invokeAndWait or SwingUtilities.invokeLater?
If your UI seems to freeze periodically, what might be a likely reason?
Which Swing methods are thread-safe?
Why won�t the JVM terminate when I close all the application windows?
How you define grouping in CSS?
How you define class Selector?
How you define id Selector?
How to set CSS comment?
How you insert Style Sheet in the HTML document?
How to set background with CSS?
How to set CSS font?
How to create CSS Border?
How to set CSS Outlines?
How you define CSS Margin?
How you define CSS Padding?
What is double buffering ?
How you define relationships b/w CSS and HTML?
How you define CSS,CSS2 and CSS3?
How you define floating element in CSS?
How you define ruleset inCSS?
How you define First-line pseudo-element in CSS?
How you define at-rule in CSS?
Tell me about types of CSS rule?
What are the advantages of CSS?
Is CSS case-sensitive or not?
What is an event?
What is an event handler ?
Which containers use a border Layout as their default layout?
What method is used to specify a container\'s layout?
What is the difference between invokeAndWait() and invokeLater()?
Why should any swing call back implementation execute quickly?
Which method is used by the applet to recognize the height and width?
What is source and listener ?
What is controls and what are different types of controls in AWT?
What is the difference between choice and list?
What is the difference between scrollbar and scrollpane?
What is a layout manager and what are different types of layout managers available?
What is the JavaScript?
How are the elements of different layouts organized?
What are types of applets?
What are the restrictions imposed by a Security Manager on Applets?
What is the difference between the Font and FontMetrics classes?
What is the relationship between an event-listener interface and an event-adapter class?
How can a GUI component handle its own events?
What is the difference between the paint() and repaint() methods?
What interface is extended by AWT event listeners?
What is Canvas ?
What is default Look-and-Feel of a Swing Component?
What are the features of JFC?
What does x mean in javax.swing?
What are invisible components?
What is the default layout for a ContentPane in JFC?
What does Realized mean?
Is Java and JavaScript are same or not?
When we use JavaScript?
What are you understand about ECMAScript?
How to use JavaScript on HTML pages?
How to use comments in JavaScript?
In HTML where JavaScript will executed?
How to use an External JavaScript?
Is JavaScript Case-Sensitive or not?
How you define JavaScript Statement?
How you define JavaScript Code?
What is difference between Swing and JSF?
Why does JComponent class have add() and remove() methods but Component class does not?
What method is used to specify a container\'s layout?
What is the difference between AWT and SWT?
What is the difference between JFC & WFC?
What is a convertor?
What is the difference between a Canvas and a Scroll Pane?
What is the purpose of the enableEvents() method?
What is the difference between a MenuItem and a CheckboxMenuItem?
Which is the super class of all event classes?
How the Canvas class and the Graphics class are related?
What is the difference between a Window and a Frame?
What is the relationship between clipping and repainting?
What advantage do Java\'s layout managers provide over traditional windowing systems?
When should the method invokeLater() be used?
How you define JavaScript Blocks?
How we use JavaScript Comments?
How you define Javascript Variable?
How to create variable and assign value to those variables in JavaScript?
What is the diff b/w choice and the List ?
How you define JavaScript Operator?
Which component subclass is used for the drawing and painting ?
Which containers may have a menu bar?