« Teppefall Hybrid preview | Main | Hybrid tutorial - Writing a desktop application in Javascript »

Hybrid tutorial - Hello world!

About
This tutorial shows you how to create a desktop application in Teppefall Hybrid.

Dependencies
You need the teppefall-runtime.jar file from the Teppefall SDK and the Teppefall Layout application.

hello.xml
<application>

<id>com.teppefall.example</id>
<name>Hello World</name>
<version>1.0</version>

<initialWindow>
<title>Hello World !</title>
<content>hello.jxml</content>
<systemChrome>none</systemChrome>
</initialWindow>

<icon>
<image32x32>icon.png</image32x32>
</icon>

</application>

hello.jfc (open this in Teppefall Layout)
<component class="javax.swing.JLabel" text="Hello World !"/>


hello.jxml (created by Teppefall Layout 4)
<?xml version="1.0" encoding="utf-8"?>
<!--Teppefall Layout 4.0-->
<java version="1.4.2" class="java.beans.XMLDecoder">
<object id="self" class="com.teppefall.ds.layout.jxml.jfc.JFCAssembly">
<void method="add">
<object class="javax.swing.JLabel">
<void property="text">
<string><![CDATA[Hello World !]]></string>
</void>
</object>
</void>
</object>
</java>

run.cmd
java -cp ../teppefall-runtime.jar com.teppefall.hybrid.app.JJHMain hello.xml



TrackBack

TrackBack URL for this entry:
http://www.installer.teppefall.com/movabletype/mt-tb.cgi/213

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

This website is all about alpha and beta software

Download non-beta software here