Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Applet
« Previous
Next »
To determine the width and height of an application, which of the following method is used?
Options
- getWidthHeight()
- setWidthHeight()
- getSize()
- setHeightWidth()
CORRECT ANSWER : getSize()
Discussion Board
java applet
This tutor is very help full.
Thank''s ,
I don''t know who u are ,
but u are best
priyesh 04-7-2019 09:08 AM
getSize()
getSize() is used to determine the height and width of the application as running inside a web browser the size of an applet is set by the height and width attributes and cannot be changed by the applet. Many applets need to know their own size as its not feasible to draw outside the lines. Getting applet size with getSize() is simple as java.applet.Applet inherits this method from java.awt.Component. getSize() returns a java.awt.Dimension object.
A Dimension object has two public int fields, height and width. Below is a simple applet that prints its own dimensions. So, it is used as getSize().width and getSize().height.
Rohit Sharma 09-30-2014 04:10 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲