Saturday, October 29, 2011

What should I do? after download eclipse indigo

1. extract file or  Unzip the downloaded file to C:\Program Files or other patch.
2. Create Shortcut or if you using windows 7 pin to start menu 
3. Run eclipse ,


  Then   set the default installed JRE to Java 1.6 :
  •   Open the Eclipse Preferences Pane (Window -> Preferences) and go to the Java >> Installed JREs subpane.
  • Check the JRE 1.6.0_<version> as the default (where <version> is a two digit number representing the version number that you downloaded and installed). Click OK to save the settings.
 Then test the eclipse by creating project New->Project, create the class New -> Class , name the class myapp. copy this code to eclipse

public class myapp {

  public static void main(String[] args) {

      System.out.println("My first application");
  }
}



 Save then run the program , if succes now you can use it to coding.

Friday, October 28, 2011

Create mobile application with J2ME : FillRoundRect


The rectangular shape is definitely an part of the canvas described through 4 corners , as being a rectangular shape that you could pull utilizing document as well as pen. You define a rectangle’s dimensions by identifying coordinates for the upper-left corner and the lower-right corner. Four types of rectangles can be drawn on a canvas.

They are a good layed out rectangular shape, stuffed rectangular shape, layed out rectangular shape along with curved edges, along with a stuffed rectangular shape along with rounded corners.

An outlined rectangle is one where only line segments connecting the corners are drawn. The inside of the rectangle remains the same color as the outside of the rectangle. 
FillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
 Returns FillRoundRect by rounded rectangle 


example code :
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

/**
 * @author 1code
 */
public class fill extends MIDlet {
    private Write canvas;
     Display display;

    public void startApp() {
       display = Display.getDisplay(this);
       canvas = new Write(this);
       display.setCurrent(canvas);

    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
}

class Write extends Canvas  {
     fill midlet;
    private final fill This;

    public Write(fill This) {
        this.midlet= midlet;
      this.This = This;
    }

    protected void paint(Graphics drwa) {
        drwa.setColor(255,255,255);  //the background
    drwa.fillRect(0,0,getWidth(),getHeight());
//fill background
drwa.setColor(0,0,255);
        drwa.fillRoundRect(getWidth()/5, getHeight()/4, getWidth()/6, getHeight()/2, 7, 10);

        drwa.setColor(254,0,255);
        drwa.fillRoundRect(getWidth()/2, getHeight()/4, getWidth()/6, getHeight()/4, 180, 360);
      
    }

 

Create mobile application with J2ME : line Canvas

Any canvas-based graphical user interface contains instances of the particular Canvas school inside of which usually the particular designer generates photos for instance people found in a  game. On this phase you’ll understand in regards to the Control class and stay released to be able to varieties. The canvas is divided into a virtual grid in which each cell represents one pixel. Coordinates mark the column and row of a cell within the grid . The x coordinate represents the column, and the y coordinate represents the cell’s row. The first cell located in the upper-left corner of the grid has the coordinate location of 0, 0, where the first zero is the x coordinate and the other zero is the y coordinate.

Low  lets coding , i will create simple line with canvas.
import the package ;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Graphics;
import javax.microedition.midlet.*;



Or import all package from icdui
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;


Create Class

public class line extends MIDlet {
    private Write canvas;
     Display display;
    public void startApp() {
       display = Display.getDisplay(this);
       canvas = new Write(this);
       display.setCurrent(canvas);  
    }
    public void pauseApp() {
    }
    public void destroyApp(boolean unconditional) {
    }
}


Create class for drawing

class Write extends Canvas  {
     line midlet;
    private final line This;

    public Write(line This) {
        this.midlet= midlet;
      this.This = This;
    }

    protected void paint(Graphics drwa) {
        drwa.setColor(255,255,255);
    drwa.fillRect(0,0,getWidth(),getHeight());
        drwa.setColor(0,0,0);
        drwa.drawLine(getWidth(), getHeight(), 0, 0);
        drwa.setColor(255,0,0);
        drwa.drawLine(getWidth(), 0, 0, getHeight());
    }

Open Source IDE : KDevelop

KDevelop is a free software integrated development environment (IDE) for the KDE Platform on Unix-like computer operating systems. KDevelop is a cross platfrom IDE , can run in MS Windows, Mac OS X, Linux, Solaris and FreeBSD.

It is a feature-full, plugin extensible IDE for C/C++ and other programming languages. KDevelop includes no compiler.  As a substitute, the item works by using a additional compiler like gcc to provide executable value.
The current version, 4.2, was officially released on 27 January 2011. It builds on KDE 4 technology and supports C, C++ and PHP development.

The last stable release from the prior main edition, 3. 5. 5, that is dependant on K Desktop Environment 3 technology, facilitates numerous encoding 'languages' for example Ada, Party, D, C++, Fortran, Espresso, Pascal, Perl, PHP, Python as well as Dark red. Launched underneath the GNU Public Permit, KDevelop is actually free of charge software program.

Features
  • Display problems in source-code
  • Show information about declarations (classes, functions, templates...) in libraries and your application
  • Intelligent auto-completion showing those methods which could be used in the current context including their signature and documentation
  • Show usages of declarations/rename them
  • Context-specific highlighting
  • Debugging using gdb
  • SVN integration
  • Manage CMake-targets and build them
  • CMake-auto-completion showing defined macros and variables
  • Kate-integration
  • Custom makefiles
  • C++-specific:
    • Consideration of Qt's signals and slots by the auto-completion
    • Qt-Documentation
    • Unroll constants and typedefs (partial)
    • Create class dialog, which allows to select those methods which should be overloaded
  • PHP-specific:
    • Guess the type of variables
    • Show documentation from php.net
  • Experimental:
    • QtDesigner support
    • Valgrind
    • xdebug (PHP-debugger)
    • Unit testing
    • Java, C#, CSS and XML support
    • Mercurial support

Open Source IDE : Eclipse

Eclipse is an open source community, whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle.

The Eclipse Foundation is a not-for-profit, member supported corporation that hosts the Eclipse projects and helps cultivate both an open source community and an ecosystem of complementary products and services.

Eclipse is often a multi-language software package development environment containing an integrated development environment (IDE) along with the extensible plug-in .  It is written mostly in Java and can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy and Scheme.



It can also be used to develop packages for the software Mathematica. The IDE is often called Eclipse ADT (Ada Development Toolkit) for Ada, Eclipse CDT for C/C++, Eclipse JDT for Java, and Eclipse PDT for PHP.

Eclipse was originally released under the Common Public License, but was later relicensed under the Eclipse Public License. The Free Software Foundation has said that both licenses are free software licenses, but are incompatible with the GNU General Public License (GPL). Mike Milinkovich, of the Eclipse Foundation commented that moving to the GPL would be considered when version 3 of the GPL was released.[

Open Source IDE : NetBeans


The NetBeans IDE is an open-source Integrated Development Environment, a free open-source Integrated Development Environment for software developers. All the tools needed to create professional desktop, enterprise, web, and mobile applications with the Java platform, as well as with C/C++, PHP, JavaScript and Groovy.

The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.

NetBeans IDE supports development of all Java application types (Java SE including JavaFX, (Java ME, web, EJB and mobile applications) out of the box.

The philosophy behind Netbeans is to provide an extensible IDE that provides all the tools necessary to develop desktop, enterprise, web and mobile applications. The ability to install plug-ins allows developers to tailor the IDE to their individual development tastes.

This bundle includes:

    NetBeans Base IDE
    Java SE, JavaFX
    Web and Java EE
    Java ME
    C/C++
    PHP (Version 6.5 and later)
    GlassFish
    Apache Tomcat

License: From July 2006 through 2007, NetBeans IDE was licensed under Sun's Common Development and Distribution License (CDDL), a license based on the Mozilla Public License (MPL). In October 2007, Sun announced that NetBeans would henceforth be offered under a dual license of the CDDL and the GPL version 2 licenses, with the GPL linking exception for GNU Classpath

via  wikipedia , about.com

Thursday, October 27, 2011

Java JFrame Basic Tutorial : Video

The Frame describes the visual interface (GUI) component which is a top level window with a title and a border. The Frame that is put in place like a JFrame item , will often possess adornments like a edge along with a name. Apart from which, the actual JFrame item additionally facilitates control keys items that are accustomed to near or even iconify the actual eye-port. The actual edge region that's contained in the general dimension from the frame could be determined while using getInsets technique. A minumum of one body is usually contained in the GUI dependent software.

Following are the constructors used in creating JFrame components:-
1) JFrame()
which creates a new frame that is initially invisible. 
2) JFrame(GraphicsConfiguration gc)
which  creates a Frame in the specified GraphicsConfiguration of a screen device with a blank title. 
3) JFrame(String title)
which   creates a new, initially invisible Frame with the specified title. 
4) JFrame(String title, GraphicsConfiguration gc)
which creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device. 

This is best video tutorial JFrame basic , all tutorial using eclipse.

 






 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes