In classes that manage Image objects such as JFImageButton and JFListView, images may not be displayed correctly immediately after activation because an Image object is set to the GU library even though image loading has not been completed.
To resolve this problem, use the java.awt.MediaTracker class to make a setting such that an image is set to the GUI library after image loading has been completed.
Example
image = getImage(getDocumentBase(),"image.gif"); MediaTracker tracker = new MediaTracker(component); tracker.addImage(image ,0); try{ tracker.waitForID(0); }catch(InterruptedException e){ // failed } |
When using GUI components, we recommend using the following or the class derived from the following as the container.
GUI components use resources efficiently by linking to the container these classes or the derived class of these.
These resources should be used to prevent component operations from being performed and to ensure maximum efficiency.
JFPanel
JFWindow
JFApplet
JFDialog
JFFrame
Define treatment in the following method when you do the drag & drops operation that it is provided with JDK toward JBK GUI component.
Create extends class which wants to drag & drops operation.
The interface of the drag & drops provided with JDK is mounted on the extends class, and the movement which is necessary for application or applet is defined.
For details on the drag & drops , see the JDK Documentation.