Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Flex Container Application container

Related Tutorials


 
 

Share on Google+Share on Google+

Application container

Advertisement
Application container is the root container of any flex application. tag is used in mxml file of the flex application to make the starting point of the execution of the application.

Application container

     

Application container is the root container of any flex application. <mx:Application> tag is used in mxml file of the flex application to make the starting point of the execution of the application. The application container includes all the other child containers and controls. By default, it puts the child components vertically but you can lay them out horizontal and absolute. In the case of absolute positioning, you have to specify location of child components explicitly i.e. it doesn't provide automatic layout. In absolute layout , you have to  specify the location by providing values to x and y coordinates otherwise (0,0) is default position.

The code below is the example of using application container:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="458" height="242" backgroundGradientColors="[#FFFFFF, #bbbbbb]">

<mx:Panel width="200" height="200" layout="absolute" y="22" title="Panel 1" x="20">

</mx:Panel>

<mx:Panel width="200" height="200" layout="absolute" x="239" y="22" title="Panel 2">

</mx:Panel>

</mx:Application>

Output of the above code:

Download the source code:

ApplicationContainer.zip

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 14, 2009

Related Tutorials

Discuss: Application container  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com