Thursday Feb 25, 2010

JavaFX + Yahoo Weather


JavaFX Composer preview is available. You can install this plugin. In NetBeans IDE, goto "Tools" -> "Plugins" -> "Available Plugins". Select "JavaFX Composer" and install the Plugin. Please refer to NetBeans JavaFX Composer and JavaFX Composer Blogs for more information.

Summer has set in like a flick of a switch! So couldn't think of anything else other than Weather. Developed a simple Weather application using Yahoo Weather RSS Feed. It was much easier to visualize and develop using JavaFX Composer, especially for small widget like applications. Soon we will be able to develop complex application using this...

<script src="http://dl.javafx.com/1.2/dtfx.js"></script> <script src="http://javafxdemos.googlecode.com/hg/resource/Weather/Weather.js"></script>


To launch click on above image or

The city is set to Bangalore by default. Double click on the widget to enable the TextBox, in which you can enter your ZipCode or City and press "Enter" key. Ideally I must persist this information using Storage APIs, but I leave that task to you!

For getting the information from Yahoo, we need to first identify the Where On Earth ID - WOEID of the city using its ZipCode or Name. Please refer to Yahoo WOEID documentation for more information. Once we identify the WOEID, we can use forecastrss feed for getting the weather information.

Please try it out and let me know feedback..


<script type="text/javascript">var dzone_style = '2';</script> <script language="javascript" src="http://javafxdemos.googlecode.com/hg/resource/Weather/zoneit.js"></script>

About


The views expressed on this blog are my own and do not necessarily reflect that of my organization

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today