Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
2122232425 2627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > combining swing and apache pivot

Combining Swing and Apache Pivot

The question of how to combine Swing and Apache Pivot components comes up often enough that I thought I would write a quick blog entry about it. Pivot doesn't currently support embedded Swing components. However, it is possible to use Pivot components within an existing Swing application. The following demo shows a number of Pivot components hosted in a JInternalFrame; another internal frame hosts their Swing counterparts: http://ixnay.biz/pivot-demos/swing-demo.html The source code for the example is here: http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos/swing/ The SwingDemo class creates an instance of JDesktopPane to which the internal frames are added. The contents of the Pivot frame are defined in pivot_window.bxml and loaded by the createPivotFrame() method. The Swing components are constructed programmatically in createSwingFrame(). Both a main() method and an applet (SwingDemo$HostApplet) are provided to demonstrate desktop as well as web deployment. Note that SwingDemo extends the org.apache.pivot.wtk.ApplicationContext class. This is primarily so the application can access and invoke the protected createTimer() method (called in a static initializer), which is required by Pivot animations such as the spinning progress indicator shown in the demo. The ability to embed Pivot components within a Swing application does not address all use cases. Specifically, it does not support the re-use of ...


Date: October, 12 2010
Url: http://www.java.net/blog/gkbrown/archive/2010/10/12/combining-swing-and-apache-pivot


Others News

©2002-2019Java-Virtual-Machine.net de | es | website designing software | website editor | bootstrap button