This section explains the points to consider when developing and operating applets.
Selecting a Web browser
Depending on which Web browser is used, there will be differences in areas such as the size in which an applet will be displayed on the screen. In addition, depending on the browser options , some applet operations may be able to be modified. Note should also be taken of the levels of support provided by the browser for JavaScript and HTML.
Java Plugin
A Java Plugin is a mechanism for executing applets by using an external Java Virtual Machine (VM) (for example, a JDK Java VM), without using a Java VM (execution environment) provided by the Web browser. If a Java Plugin is to be used, the plugin must be installed in the client machine.
Limiting server access
In order to prevent damage due to malicious applets, access from applets to local files or other servers is prohibited.
If a function that performs communication from applets to a database server is to be used, a database server environment must be created on the Web server on which the applets exist.
In order to alleviate the load on the Web server, place server applications such as servlets and Enterprise JavaBeans (abbreviated to EJB from now on) on the Web server so that the applets can communicate with the server applications and access other servers (such as database servers) from the server applications.
Using EJB
EJB on the Web server can be used from applets.
When developing applets, add an Enterprise Bean stub to a project and join it to the JAR file of the project. Also, during operation, a library that is to be used by the EJB must be installed in a server.
Using databases
If databases on the server are to be used from applets, a JDBC driver suited to the databases must be installed in the client machine.
The following points are specific to Beans:
Split panes (JSplitPane)
In split panes, panels must be pasted onto the split parts. Therefore, when a split pane is pasted, a panel will be pasted automatically. This panel cannot be deleted.
Scrolling (JScrollPane)
In items such as the Swing list box (JList), even if the contents exceed the display area of the Bean, a scroll bar will not be added automatically. To add a scroll bar, first paste a scroll pane (JScrollPane), and then paste an item such as a Swing list box (JList) above it. This will ensure that a scroll bar will be displayed when it is needed. Note that only one Bean can be pasted into a scroll pane (JScrollPane).
For an AWT Bean, even if it is pasted into a scroll pane (JScrollPane), this scrolling action cannot be performed. AWT Beans have their own scroll function so there is no need to use a scroll pane.
Heavyweights and panels
If a Heavyweight is to be pasted onto something, it is recommended that the pasting destination also be made a Heavyweight. For example, if an AWT button or an AWT text field is to be pasted onto a panel, use an AWT panel for the panel as well.
Heavyweights and Lightweights
When Heavyweight Beans and Lightweight Beans overlap, the Heavyweight Bean will always be displayed over the top.
Invisible Beans
For pasting a new Invisible Bean without the GUI, the pasting operation is performed on the container or Java Form in the same way as for a Visible Bean. However, once it has been pasted, the Invisible Bean will not be displayed on the Java Form but will be displayed in gray on the component tree. Operate the properties by selecting the Bean on the component tree.
Tabs (JTabbedPane)
Tabs are made up of a number of pages. The following items explain the operations of adding and deleting pages and specifying page titles:
Adding a page
A Bean that has been pasted directly onto a tab becomes one page of the tab. In general, one page is made up of a number of Beans. Therefore, for each page, first paste a panel (JPanel) (a panel can paste a number of Beans internally), and then paste a number of required Beans over the top. At this time, select the layout manager of the panel as required. Note that when a new tab has been pasted, a number of pages that are pasted with that panel will be generated automatically.
To actually add a page, select a panel from the object palette and start dragging from the position of the tab strip (location at which the title of the page being clicked is displayed at page switching). A page will be added when dragging a pasted Bean from the position of the tab strip. In the same way as when the position of the tab strip is below or adjacent to the tab, when dragging is started from below or adjacent to the tab strip, a page will be added. Note that if no pages are present, a page will be added regardless of the position from which dragging starts.
Deleting a page
To delete a page from a tab, select the panel to which the page was pasted to perform a deletion operation for the Bean.
Specifying a page title
To specify a page title, select the panel of the relevant page and specify the title character string in the "constraints" in the Standard Properties of the panel.
Modifying the page order
To modify the page sequence, select the panel of the page to be modified and specify the order of addition to the Parent container.
Differences in Bean design as a result of changes in the JDK version
If the JDK version is changed, differences may occur in the Bean design.
The following describes some points to note regarding Java forms:
Do not edit change-prohibited source from the package explorer, outline, or source menu.
Note: Change-prohibited source is between lines starting with "// Graphical Editor Form" and "//@@Form Design Information start" and ending with "//@@Form Design Information end".
The background color of change-prohibited source cannot be changed.
Java Form Designers are started separately for each project.
The source for Java forms, applets, and JavaBeans cannot be refactored.
Do not change the file name in the Navigator view. Use the Java Form Designer to save the Java form source with a different name. If the name is changed inadvertently, restore the original name and then open it again.
If Java form class declarations get corrupted and cannot be parsed, restore the source for the part that cannot be parsed. The source from before restoration remains as is, without being commented out.
The Graphical Editor cannot open link files or files that are in link folders.
If an editor other than the Graphical Editor is used to edit a Java form, applet, or JavaBeans file, use a function such as the local history to restore the file to the state it was in before it was edited, then re-open with the Graphical Editor.
The "Reference" menu in the Bean List view is not displayed in the standard workbench. Refer to the appropriate manuals for the API references.
Regarding the properties window Help display feature: The Help button remains enabled even if there is no manual for the selected item. Additionally, items related to the Peculiar Property JBK may not always be displayed. These are limitations.
Notes on Editing the Screen Control Panel
The following describes some points to note regarding the editing of the Screen Control Panel:
If the name of the Screen Control Panel file is changed using refactoring, the file is refactored at that point, even if it is being edited. Refactoring is not reflected in the source being edited. Additionally, when the source that is being edited is saved, the file is saved using the file name of the file before it was changed by refactoring.
Common Notes
The following describes some other points to note:
If a file or project that is being edited in the Graphical Editor is moved, has its name changed, or is deleted, the editing in the Graphical Editor cannot be continued.
Do not use non-Windows line separators (from UNIX or Macintosh, for example) in the source.
Do not edit a file that is being edited by a Graphical Editor from multiple workbenches simultaneously.
The source that can be edited with the Graphical Editor cannot include the following in its class and method declarations:
Generics
Varargs
Annotations (Metadata)