Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
- Interview Questions and Answers for 'Java ui' - 5 question(s) found - Order By Newest | ||||
| ||||
Ans. Swing provides both additional components like JTable, JTree etc and added functionality to AWT-replacement components. Swing components can change their appearance based on the current “look and feel†library that’s being used. Swing components follow the MVC paradigm, and thus can provide a much more flexible UI. Swing provides extras for components, such as icons on many components, decorative borders for components, tool tips for components etc. Swing components are lightweight than AWT. Swing provides built-in double buffering ,which means an off-screen buffer is used during drawing and then the resulting bits are copied onto the screen. Swing provides paint debugging support for when you build your own component. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   awt   java ui   swing   difference between swing and awt   architecture | ||||
| ||||
Ans. public void init() public void start() public void stop() public void destroy() | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java ui   applet   swing   awt | ||||
| ||||
Ans. Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser. Lifecycle methods of Applet - init( ) method - Can be called when an applet is first loaded start( ) method - Can be called each time an applet is started paint( ) method - Can be called when the applet is minimized or maximized stop( ) method - Can be used when the browser moves off the applet's page destroy( ) method - Can be called when the browser is finished with the applet | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java ui   applet   swing   awt   lifecycle of applet   technologies | ||||
| ||||
Ans. Controls are components that allow a user to interact with your application and SWT / AWT supports the following types of controls: Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components. These controls are subclasses of Component. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java ui   swt   awt   types of controls | ||||
| ||||
Ans. Follow the below steps: 1- import the required class and packages. 2- create a class Drawtest for creating an applet. 3- initialize panles and controls int the init() method. 4- Define the destroy() method to destroy the same. 5- create an instance for draw test class and call the init(0 and start() methods in the main method)). 6- Add a new frame to the applet window and resize it to 300x300. 7- Declare a method get applet infor to display the applet information. 8- Declare two constants LINES , POINTS which are going to be the modes. 9- Define the paint method and perfoem the required operations. 10- Display the result according to the mode selected. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  applets   java gui   java ui | ||||