![]() |
||
![]() |
![]() Alden Hosting provides professional, efficient, and reliable business-class Web hosting services to small- and medium-sized businesses. |
|
|
JAVA, JSP, SERVLETS, TOMCAT, SERVLETS MANAGER, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Layer Name | Value | Description |
|---|---|---|
FRAME_CONTENT_LAYER | new Integer(-30000)
|
The root pane adds the menu bar and content pane to its layered pane at this depth. |
DEFAULT_LAYER | new Integer(0)
|
If you don't specify a component's depth when adding it to a layered pane, the layered pane puts it at this depth. |
PALETTE_LAYER | new Integer(100)
|
This layer is useful for floating tool bars and palettes. |
MODAL_LAYER | new Integer(200)
|
Modal internal-frame dialogs would belong in this layer. |
POPUP_LAYER | new Integer(300)
|
Popups go in this layer because they need to appear above just about everything. |
DRAG_LAYER | new Integer(400)
|
Intended to be used when a component is being dragged. The component should return to its regular layer when dropped. |
Here is a picture of RootLayeredPaneDemo, which is a version of LayeredPaneDemo that uses the root pane's layered pane, rather than creating a new layered pane.

Try this:
- Click the Launch button to run RootLayeredPaneDemo using Java™ Web Start (download JDK 6). Alternatively, to compile and run the example yourself, consult the example index.
![]()
- Move the cursor around in the window, so that Duke moves on top of other components.
Note that when the cursor is on top of non-label components — whether it's in the content pane or in the Java-look-and-feel provided title bar — Duke's movement is temporarily stopped. This is because mouse-motion events go to the component that's deepest in the containment hierarchy and is interested in mouse events. The mouse-motion listener that moves Duke is registered on the layered pane, and most of the components in that pane (with the exception of the labels) happen to have mouse-motion listeners. When the mouse moves over an interested component in the layered pane, the layered pane doesn't get the event and the interested component does.- Making sure the Top Position in Layer check box is selected, change Duke's layer to Yellow (-30000).
As before, he appears on top of other components, except for the Magenta (0) and Cyan (301) rectangles.- Keeping Duke in the Yellow layer, click the check box to send Duke to the back of layer -30000.
Duke disappears because the content pane and all the components in it are now above him.- Change Duke's layer to Cyan (301), move Duke down a bit so he's standing on the top edge of the Yellow rectangle, and then press Space to bring up the combo box's drop-down list.
If the look and feel implements the drop-down list as a lightweight popup, Duke appears on top of the drop-down list.
The tables that follow list the API for using root panes, glass panes, and content panes. For more information on using content panes, go to Using Top-Level Containers. Here are the tables in this section:The API for using other parts of the root pane is described elsewhere:
Using a Root Pane Method Purpose JRootPane getRootPane()
(inJApplet,JDialog,JFrame,JInternalFrame, andJWindow)Get the root pane of the applet, dialog, frame, internal frame, or window. static JRootPane getRootPane(Component)
(inSwingUtilities)If the component contains a root pane, return that root pane. Otherwise, return the root pane (if any) that contains the component. JRootPane getRootPane()
(inJComponent)Invoke the SwingUtilitiesgetRootPanemethod for theJComponent.void setDefaultButton(JButton)
JButton getDefaultButton()Set or get which button (if any) is the default button in the root pane. A look-and-feel-specific action, such as pressing Enter, causes the button's action to be performed.
Setting or Getting the Root Pane's Contents
The following methods are defined inJApplet,JDialog,JFrame,JInternalFrame,JRootPane, andJWindow, unless noted otherwise.Method Purpose void setGlassPane(Component)
Component getGlassPane()Set or get the glass pane. void setLayeredPane(JLayeredPane)
Container getLayeredPane()Set or get the layered pane. void setContentPane(Container)
Container getContentPane()Set or get the content pane. void setJMenuBar(JMenuBar)
JMenuBar getJMenuBar()
(not defined inJWindow)Set or get the menu bar.
Every Swing program has a root pane, but few reference it directly. The examples in the following list illustrate how to use features ofJRootPaneor the glass pane. Also see these lists:
- Examples that Use Layered Panes
- Examples that Use Menus
- Examples that Use Frames (for examples of using content panes)
Example Where Described Notes GlassPaneDemoThis section Uses a glass pane that paints a bit and redispatches events. RootLayeredPaneDemoThis section Adapts LayeredPaneDemo to use the root pane's layered pane. ListDialogHow to Use Lists Sets the default button for a JDialog.FrameDemo2How to Make Frames Sets the default button for a JFrame.DragFileDemoIntroduction to Drag and Drop and Data Transfer Sets the default button for whatever root pane contains an instance of a particular JPanelsubclass. Uses thegetRootPanemethod inherited fromJComponent.
Alden Hosting offers private JVM (Java Virtual Machine), Java Server Pages (JSP), Servlets, and Servlets Manager with our Web Hosting Plans WEB 4 PLAN and WEB 5 PLAN , WEB 6 PLAN .
At Alden Hosting we eat and breathe Java! We are the industry leader in providing affordable, quality and efficient Java web hosting in the shared hosting marketplace. All our sites run on our Java hosing platform configured for optimum performance using Java 1.6, Tomcat 6.0.X, MySQL 5.0.x, Apache 2.2.xx and web application frameworks such as Struts, Hibernate, Cocoon, Ant, etc.
We offer only one type of Java hosting - Private Tomcat. Hosting accounts on the Private Tomcat environment get their very own Tomcat server. You can start and re-start your entire Tomcat server yourself.
![]() |
|
http://alden-servlet-Hosting.com
JSP at alden-servlet-Hosting.com
Servlets at alden-servlet-Hosting.com
Servlet at alden-servlet-Hosting.com
Tomcat at alden-servlet-Hosting.com
MySQL at alden-servlet-Hosting.com
Java at alden-servlet-Hosting.com
sFTP at alden-servlet-Hosting.com
http://alden-tomcat-Hosting.com
JSP at alden-tomcat-Hosting.com
Servlets at alden-tomcat-Hosting.com
Servlet at alden-tomcat-Hosting.com
Tomcat at alden-tomcat-Hosting.com
MySQL at alden-tomcat-Hosting.com
Java at alden-tomcat-Hosting.com
sFTP at alden-tomcat-Hosting.com
http://alden-sftp-Hosting.com
JSP at alden-sftp-Hosting.com
Servlets at alden-sftp-Hosting.com
Servlet at alden-sftp-Hosting.com
Tomcat at alden-sftp-Hosting.com
MySQL at alden-sftp-Hosting.com
Java at alden-sftp-Hosting.com
sFTP at alden-sftp-Hosting.com
http://alden-jsp-Hosting.com
JSP at alden-jsp-Hosting.com
Servlets at alden-jsp-Hosting.com
Servlet at alden-jsp-Hosting.com
Tomcat at alden-jsp-Hosting.com
MySQL at alden-jsp-Hosting.com
Java at alden-jsp-Hosting.com
sFTP at alden-jsp-Hosting.com
http://alden-java-Hosting.com
JSp at alden-java-Hosting.com
Servlets at alden-java-Hosting.com
Servlet at alden-java-Hosting.com
Tomcat at alden-java-Hosting.com
MySQL at alden-java-Hosting.com
Java at alden-java-Hosting.com
sFTP at alden-java-Hosting.com
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP at JSP.aldenWEBhosting.com
Servlets at servlets.aldenWEBhosting.com
Tomcat at Tomcat.aldenWEBhosting.com
mysql at mysql.aldenWEBhosting.com
Java at Java.aldenWEBhosting.com
Web Hosts Portal
Web Links
Web Links
Web Hosting
JSP Solutions Web Links
JSP Solutions Web Hosting
Servlets Solutions Web Links
Servlets Solutions Web Hosting
Web Links
Web Links
.
.
.
.
.
.
.
.
.
.
jsp hosting
servlets hosting
web hosting
web sites designed
cheap web hosting
web site hosting
myspace web hosting