InterviewSolution
| 1. |
How Can You Set An Applet's Height And Width As A Percentage? |
|
Answer» You use the <APPLET> tag WIDTH and HEIGHT attributes to SPECIFY the pixel size of an applet WINDOW. In ADDITION to letting you specify the applet window size in TERMS of pixels, many browsers LET you specify the applet window's size as a percentage of the browser's window's size. You do this by specifying a percentage value for the HEIGHT and WIDTH attributes within the <APPLET> tag. For example, the following <APPLET> entry creates an applet window based on 50% of the height and 100% of the width of the browser's window: <applet code=test.class width=100% height=50%> </applet>.You use the <APPLET> tag WIDTH and HEIGHT attributes to specify the pixel size of an applet window. In addition to letting you specify the applet window size in terms of pixels, many browsers let you specify the applet window's size as a percentage of the browser's window's size. You do this by specifying a percentage value for the HEIGHT and WIDTH attributes within the <APPLET> tag. For example, the following <APPLET> entry creates an applet window based on 50% of the height and 100% of the width of the browser's window: |
|