Top 50 Java-google Web Toolkit (GWT) Interview Questions
Q1. What Is The Purpose Of 'script' Tag In *.Gwt.Xml File In Gwt?
Automatically injects the outside JavaScript report positioned on the area targeted with the aid of src.
Q2. What Is The Purpose Of Image Widget Of A Gwt?
This widget displays an photograph at a given URL.
Q3. What Is The Difference Between Primary Style And Secondary Styles Of A Gwt Widget?
By default, the primary fashion name of a widget could be the default fashion name for its widget class. For instance, gwt-Button for Button widgets. When we add and do away with fashion names the usage of AddStyleName() technique, those styles are known as secondary patterns.
The very last appearance of a widget is determined via the sum of all of the secondary patterns added to it, plus its number one fashion. You set the primary style of a widget with the setStylePrimaryName(String) method.
Q4. What Is The Purpose Of 'module' Tag In *.Gwt.Xml File In Gwt?
This provides call of the software.
Q5. What Is The Purpose Of 'inherits' Tag In *.Gwt.Xml File In Gwt?
This provides different gwt module in utility similar to import does in java packages. Any variety of modules can be inherited on this way.
Q6. What Is The Default Style Name Of Any Gwt Widget?
By default, the magnificence name for each aspect is gwt-<classname>. For instance, the Button widget has a default style of gwt-Button and comparable manner TextBox widgest has a default fashion of gwt-TextBox.
Q7. What Is .Cache.Html File In Gwt?
It incorporates the real program of a GWT utility.
Q8. How Onmoduleload() Functions Get Called If Multiple Entry-point Classes Are Specified In *.Gwt.Xml?
They are referred to as sequentially inside the order in which entry-point classes seem inside the module file. So while the onModuleLoad() of your first entry factor finishes, the next entry factor is known as straight away.
Q9. What Is Module Descriptor In Gwt?
A module descriptor is the configuration report within the form of XML that is used to configure a GWT utility. A module descriptor record extension is *.Gwt.Xml, in which * is the name of the utility and this record should live within the venture's root.
Q10. How You Can Attach A Css File With Your Gwt Module?
There are a couple of procedures for associating CSS files with your module. Modern GWT programs normally use a combination of CssResource and UiBinder.
Using a <link> tag inside the host HTML web page.
Using the <stylesheet> element inside the module XML document.
Using a CssResource contained within a ClientBundle.
Using an inline <ui:style> element in a UiBinder template.
Q11. What Is The Purpose Of Html Widget Of A Gwt?
This widget can include HTML textual content and shows the html content the use of a <div> detail, causing it to be displayed with block format.
Q12. Which Class Is The Superclass Of All User-interface Classes?
The elegance UIObject is the superclass for all user-interface objects.
Q13. What Is The Purpose Of Host Page?
The maximum essential public resource is host page which is used to invoke real GWT application. A standard HTML host web page for an application won't consist of any seen HTML body content material at all but it's miles always expected to include GWT application through a <script.../> tag.
Q14. How To Enable History Support In Gwt Application?
In order to use GWT History support, we need to first embed following iframe into our host HTML web page.
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
Q15. Which Gwt Widget Represents A View Of A Tree?
CellTree widget represents a view of a tree. This widget will handiest paintings in requirements mode, which requires that the HTML web page in which it's far run have an explicit <!DOCTYPE> announcement.
Q16. Explain Uiobject Class.
The magnificence UIObject is the superclass for all consumer-interface items. It genuinely wraps a DOM element, and cannot acquire events. It provides direct child instructions like Widget, MenuItem, MenuItemSeparator, TreeItem.
All UIObject items can be styled using CSS.
Every UIObject has a primary style call that identifies the important thing CSS fashion rule that have to continually be applied to it.
More complicated styling conduct may be finished by way of manipulating an item's secondary fashion names.
Q17. Which Gwt Widget Represents A Standard Hierarchical Tree?
Tree widget represents a wellknown hierarchical tree widget. The tree consists of a hierarchy of TreeItems that the person can open, near, and select.
Q18. What Are The Features Of Gwt?
Following are the capabilities of GWT −
Google Web Toolkit (GWT) is a development toolkit to create RICH Internet Application(RIA).
GWT offers builders option to write patron aspect utility in JAVA.
GWT compiles the code written in JAVA to JavaScript code.
Application written in GWT is pass-browser compliant. GWT automatically generates javascript code appropriate for every browser.
GWT is open supply, absolutely free, and utilized by hundreds of developers around the arena. It is licensed under the Apache License model 2.@
Q19. Which Gwt Widget Represents A Panel That Lays All Of Its Widgets Out In A Single Horizontal Column?
HorizontalPanel widget represents a panel that lays all of its widgets out in a single horizontal column.
Q20. What Is The Purpose Of Getstylename() Function Of A Gwt Widget?
This method gets all the object's fashion names, as a space-separated listing.
Q21. Which Widget Represents A Rich Text Editor In Gwt?
RichTextArea widget represents a rich textual content editor that allows complicated styling and formatting.
Q22. What Is Gwt Logging Framework?
The logging framework emulates java.Util.Logging, so it uses the same syntax and has the identical behavior as server aspect logging code.
GWT logging is configured the use of .Gwt.Xml documents.
We can configure logging to be enabled/disabled; we are able to allow/disable specific handlers, and change the default logging level.
Q23. What Is The Purpose Of Setstyleprimaryname() Function Of A Gwt Widget?
This approach units the object's number one fashion name and updates all established style names.
Q24. What Are The Components Of A Gwt Application?
A GWT software consists of following 4 essential parts out of which final element is non-compulsory but first 3 components are mandatory −
Module descriptors
Public sources
Client-side code
Server-aspect code
Q25. What Is The Purpose Of Label Widget Of A Gwt?
This widget consists of textual content, no longer interpreted as HTML using a <div>detail, causing it to be displayed with block layout.
Q26. What Is The Purpose Of Addstylename() Function Of A Gwt Widget?
This method will add a secondary or based fashion call to the widget. A secondary style call is an extra style call this is,so if there had been any preceding fashion names carried out they're saved.
Q27. What Is The Purpose Of 'public' Tag In *.Gwt.Xml File In Gwt?
The public direction is the location to your challenge in which static sources referenced with the aid of your GWT module, inclusive of CSS or photographs, are stored.
Q28. Which Widget Represents A Standard Push Button In Gwt?
Button widget represents a fashionable push button.
Q29. Which Class Is The Base Class Of All Layout Panel Classes?
Panel is the summary base magnificence for all panels, which can be widgets which could include other widgets.
Q30. What Is Gwt?
Google Web Toolkit (GWT) is a improvement toolkit for building and optimizing complicated browser-based applications. GWT is used by many products at Google, which include Google AdWords and Orkut.
Q31. Do Gwt Compiler Creates Default Id Attribute For Its Widget By Default?
No! By default, neither the browser nor GWT creates default id attributes for widgets.
Q32. What Is The Purpose Of 'source' Tag In *.Gwt.Xml File In Gwt?
This specifies the names of supply folders which GWT compiler will look for supply compilation.
Q33. Which Method Of A Entry-factor Class Is Called When Gwt Application Starts?
OnModuleLoad() feature gets referred to as and acts similar to predominant approach of a java software.
Q34. Explain Widget Class?
The class Widget is the bottom class for the general public of consumer-interface gadgets. Widget adds help for receiving activities from the browser and being added immediately to panels.
Q35. Which Widget Acts As A Suggestion Box In Gwt?
SuggestBox widget represents a text field or textual content location which presentations a pre-configured set of choices that fit the user's enter. Each SuggestBox is related to a single SuggestOracle. The SuggestOracle is used to offer a fixed of selections given a particular question string.
Q36. What Are Layout Panels In Gwt?
Layout Panels can incorporate other widgets. These panels controls the way widgets to be shown on User Interface. Every Panel widget inherits homes from Panel magnificence which in turn inherits houses from Widget elegance and which in turn inherits homes from UIObject magnificence.
Q37. What Is The Purpose Of Setstylename() Function Of A Gwt Widget?
This technique will clean any current styles and set the widget fashion to the new CSS magnificence provided using fashion.
Q38. What Is *.Nocache.Js File In Gwt?
It contains the javascript code required to remedy deferred binding configuarations (for example, browser detection) and to apply research desk generated via GWT compiler to find one of the .Cache.Html.
Q39. Which Gwt Widget Represents A Browsable View Of A Tree In Which Only A Single Node Per Level May Be Open At One Time?
CellBrowser widget represents a browsable view of a tree wherein only a single node per degree can be open at one time. This widget will only work in requirements mode, which requires that the HTML page in which it's miles run have an explicit <!DOCTYPE> assertion.
Q40. What Is The Purpose Of Removestylename() Function Of A Gwt Widget?
This approach will get rid of given fashion from the widget and leaves any others related to the widget.
Q41. Can You Have Multiple Entry-point Classes In A *.Gwt.Xml File?
Yes! Any wide variety of access-factor classes can be delivered.
Q42. Why Should A .Nocache.Js File Never Be Cached?
GWT compiler generates .Nocache.Js document every time with the same call every time a GWT application is compiled. So browser have to continually download the .Nocache.Js document to get the latest gwt software. Gwt.Js code virtually appends a unique timestamp at the stop of the record name so that browser constantly treat it a new file and have to never cache it.
Q43. What Are The Core Components Of Gwt?
Following are the middle components of GWT −
GWT Java to JavaScript compiler − This is the maximum crucial part of GWT which makes it a powerful device for building RIAs. The GWT compiler is used to trlate all of the utility code written in Java into JavaScript.
JRE Emulation library − Google Web Toolkit includes a library that emulates a subset of the Java runtime library. The list consists of java.Lang, java.Lang.Annotation, java.Math, java.Io, java.Square, java.Util and java.Util.Logging.
GWT UI building library − This a part of GWT includes many subparts which incorporates the real UI components, RPC help, History control, and much greater.
GWT Hosted Web Browser − GWT Hosted Web Browser lets you run and execute your GWT programs in hosted mode, in which your code runs as Java within the Java Virtual Machine with out compiling to JavaScript.
Q44. What Is Default Public Path For Static Resources In Gwt Application?
The default public route is the general public subdirectory under in which the Module XML File is stored.
Q45. What Is The Purpose Of 'access-point' Tag In *.Gwt.Xml File In Gwt?
This specifies the call of class so that you can begin loading the GWT Application.
Q46. Which Widget Represents A Single Line Text Box In Gwt?
TextBox widget represents a unmarried line textual content field.
Q47. What Is An Entry-factor Class?
A module access-factor is any class that is assignable to EntryPoint and that can be built without parameters. When a module is loaded, each access factor elegance is instantiated and its EntryPoint.OnModuleLoad() approach gets called.
Q48. What Is The Purpose Of Anchor Widget Of Gwt?
This widget represents a simple <a> element.
Q49. Explain Bootstrap Procedure For Gwt Application?
Following are the steps of bootstrap proceure for GWT application whilst a browser hundreds the GWT utility −
Browser loads the host html web page and .Nocache.Js file.
Browser executes the .Nocache.Js report's javascript code.
.Nocache.Js code resolves deferred binding configuarations (for example, browser detection) and use lookup table generated by GWT compiler to discover one of the .Cache.Html.
.Nocache.Js code then creates a html hidden iframe, inserts that iframe into the host page's DOM, and loads the .Cache.Html report into the identical iframe.
.Cache.Html includes the real software of a GWT application and as soon as loaded in iframe shows the GWT software inside the browser.
Q50. What Is The Purpose Of 'stylesheet' Tag In *.Gwt.Xml File In Gwt?
Automatically injects the external CSS record placed on the place particular by using src.

