Friday, June 7, 2013

Eclipse window builder installation guide set up tutorial sample simple program

In Eclipse, go to
Help -> Install new software
Work with -> Juno - http://download.eclipse.org/releases/juno
It will list available plugins, Navigate to General purpose, select all window builder components and swt, swing designer components and then click install.

Once installed, it will prompt for restart.

Below is the sample program

Create a new class with name One, Right Click on it from Package Explorer -> open with Window builder editor. Then insert below sample code to it and then click design tab in left bottom corner of editor window.


import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JTextArea;


public class One {    // Your class name

  public static void main(String[] args) {
    
    JFrame f = new JFrame("A JFrame");
    f.setSize(250, 250);
    f.setLocation(300,200);
    f.getContentPane().add(BorderLayout.CENTER, new JTextArea(10, 40));
    f.setVisible(true);
    
  }
}

No comments:

Post a Comment