Skip to content
December 10, 2009 / Narayan

New Stuff: Google Programming Language

Google had lauched a new programming language.. whose name is “GO” . This language is intended for programmers familiar with C or C++.

For tutorial:

http://golang.org/doc/go_tutorial.html#top

Advertisements
November 23, 2009 / Narayan

Updated Date and Time in JavaFx (Bind)[]


 /* Class : DateTrack.fx
 
     Created on Nov 20, 2009, 3:35:25 PM
 */
 //=============================================================
 //This program will update the date of your current System Date
 //Now we are tracking date via help of UTILITY CLASS "DATE"
 //and we are taking advantage of the Timeline and init()
 //If any thing goes wrong then please comment me
 //==============================================================

package practice;  // you can change as per your package


//Import Directives...
import java.util.Date;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;

/**
 * @author NARAYAN
 */
//--------------------
//Variable declaration
//--------------------

var myDate = "";  // just initializing..

//This will execute init() of Clock Class
var myClock = new Clock();

//Declaring Class Clock for updating Date
class Clock {
 public function nextTime() {
     var now = new Date();
     myDate = "{%tEc now}";
     /*
     * {%tEc now} is the extended format used
     * for the java.util.Date object ("now").
     *
     * %tx - Localized date
     * %tX - Localized time
     * %tu - A day of the week (1-7, 1 is for Monday)
     * %tEx - Locale's alternate date representation
     * %tEX - Locale's alternate time representation
     */

 }

 // THIS WILL BE EXECUTED AT FIRST...
 init { //INITIAL
     var time = Timeline {
         repeatCount: Timeline.INDEFINITE
         keyFrames: [
             KeyFrame {
                 time: 1s
                 action: function() {
                    nextTime();
                 }
             }
         ]
     }
     time.play(); // TAKING ACTION TO PLAY
 }
}

Stage {
     title: "Application title"
     width: 250
     height: 80
     scene: Scene {
         content: [
             Text {
                 font : Font {
                 size : 16
                }
             x: 10
             y: 30
             // Binding the current date
             // which helps to show updated date
             content: bind {myDate};

             }

         ]
     }
}
November 14, 2009 / Narayan

A FaceBook Apps (IP TRACKING SYSTEM)

Hello! I’ve made a small java application via javafx.
It’s apps name is IP Tracker System
Funtion:

  • Displays your IP
  • This helps to find which Country you are from
  • Also Region and City is displayed

For FaceBook Users: You can simply get this apps from Facebook by this link: IP Tracker System in FaceBook

Other: Just click at this link to see javafx application of IP Tracker System in FaceBook

Snap Shot:

Facebook IP Track

 

If you see Blank then please download Java from here

IP TRACKER SYSTEM



October 15, 2009 / Narayan

JNLP on Desktop and Start Menu with Icon

As you have already heard about the extension (*.jnlp) which had made the java developer more easier to present their programs with a single file..

Actually the jnlp extension is a ext. of Sun Java. We can simply present the jnlp in both web(browser) and desktop .

The Web Start mechanism has made this jnlp to run at the top of Java 2 platform.

In this blog I’m going to show how can we make our program to display as a icon at Desktop and Start Menu.

As i’m just going through a sample jnlp file which is being resulted by NetBeans..see (how  to create jnlp from NetBeans).

Ok here is our JNLP code: Read more…

October 15, 2009 / Narayan

How to create JNLP(Web Start Launcher) from NetBeans 6

This post has been moved to this url : http://blog.ngopal.com.np/?p=550

September 15, 2009 / Narayan

How to make Jar files and executable

Actually the jar files are the bundled file of all the classes, images and other resources which are need for running java application. Most of the JAR files are used for J2ME(Mirco Edition) purpose, i mean at Mobile Devices where java is compatible.
The JAR files can be easily made from numerous of processes but among them i’m going to demonstrate here through IDE NetBeans for creating JAR file and executable.

For making JAR files you must have following requirements:

  1. Java preinstalled  (1.5 or greater)
  2. Windows Platform
  3. One Manual Project which contains Swing Component or Applet

Ok now let’s begin to Bundle our Files in JAR format.

Firstly run NetBeans and make one Project which displays GUI .
Now Open the project which u downloaded or just use your own Project.

Press Ctrl+1 for enabling Project Tab and you can see your project there: Read more…

September 15, 2009 / Narayan

Merging JAR files to single JAR via IDE NetBeans 6.7

Actually I am going to  show the simple way to merge many jar files to a single jar file .

Requirements:

  • Firstly We need the NetBeans6.x.x
  • JDK 1.6

Here we’ll create a sample Project which is included in NetBeans.

I ‘m using NetBeans 6.7.1 and now i am starting my demonstration.

Let’s make a project File>New Project> …. and as your requirement you can make a project but there

is need of some extra jar files . If you are not familiar with adding jar files to Projects then , Read more…