This essay developed out of conversations I've had with several other programmers about why Java smelled suspicious. It's not a critique of Java!
Sycorax - complete tutorials
Programming Tutorials
" Java provides the industry - software companies and customer alike , an opportunity to create a true open computing environment where software is portable,
and customers benefit from increase competition. "
Java and the Future
December 1, 2008-LEJB 3.1: EJB New and Improved!
The EJB 3.0 specification was a huge improvement from what you were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use.
December 1, 2008-Should Java Assert that Network I/O Can't Occur on the UI Thread?
Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done.
Register now to recieve special alert and latest technology news!
Applet Interview Question
How do I select a URL from my Applet and send the browser to that page?
Ask the applet for its applet context and invoke showDocument() on that context object.
URL targetURL;String URLString
AppletContext context = getAppletContext();
try
{
targetURL = new URL(URLString);
}
catch (MalformedURLException e)
{
// Code for recover from the exception
}
context. showDocument (targetURL);
Can applets on different pages communicate with each other?
No, Not Directly. The applets will exchange the information at one meeting place either on the local file
system or at remote system.
Which method is used to output a string to an applet? Which function is this method included in?
drawString( ) method is used to output a string to an applet. This method is included in the paint method of the Applet.
What are the steps involved in Applet development?
Following are the steps involved in Applet development:
- Create/Edit a Java source file. This file must contain a class which extends Applet class.
- Compile your program using javac
What are the Applet's information methods?
The following are the Applet's information methods: getAppletInfo() method: Returns a string describing the applet, its author, copyright information, etc. getParameterInfo( ) method: Returns an array of string describing the applet's parameters.
What tags are mandatory when creating HTML to display an applet?
code, height, width
What is AppletStub Interface?
The applet stub interface provides the means by which an applet and the browser communicate. Your code will not typically implement this interface.
Which classes and interfaces does Applet class consist?
Applet class consists of a single class, the Applet class and three interfaces: AppletContext, AppletStub, and AudioClip.
How do I determine the width and height of my application?
Use the getSize() method, which the Applet class inherits from the Component class in the Java.awt package. The getSize() method returns the size of the applet as a Dimension object, from which you extract separate width, height fields. The following code snippet explains this:
Dimension dim = getSize();int appletwidth = dim.width();
int appletheight = dim.height();
What is the code to include applet in an HTML file?
Once an applet has been compiled, it is included in an HTML file using the APPLET tag. The applet will be executed by a Java-enabled web browser when it encounters the APPLET tag within the HTML file.
<applet code="MyApplet" width=200 height=60>
</applet>