Importing SWT Project Into Workspace Using Eclipse.

Monday, 20 October 2008

First create a Java project. So in the “File” menu, click “Import”. Select the “Existing Projects into Workspace” wizard, and then click “Next” button. Click “Select archive file:” and find the SWT project path. Click the “Finish”. This wizard will create a project called “org.eclipse.swt”. You can see the project at “Package Explorer”.
Open the “properties” window of your Java project. Open the “Java Build Path” page. On the “Projects” tab, pres the “Add…” button and chose “org.eclipse.swt”, and then press “OK”. And press “OK” again. So we added SWT project into workspace.

Reference: SWT.


Java Web Browser

Monday, 6 October 2008

Java webbrowser pivot code:

import java.io.*;

:
:

java.net.URL url;

try{

url=new java.net.URL(jTextField1.getText());

jEditorPane1.setPage(url);

}

catch(IOException e){

System.err.print(evt);

System.exit(-1);

}


How can I start to learning PHP?

Thursday, 2 October 2008

One of my friends asked me this question. And I want to share the answer.
The php files run on a web server, create web pages and send the html files to the client. Let’s start.

First we need a web server. I recommend EasyPHP, you can download this program from SourceForge. After installed the program you can see EasyPHP icon at “Notification Area”. Go to your “easyphp\www” directory, generally in “…\program files\EasyPHP\www”.

Create a directory such as “mywebdir” and open the directory.Open your favorite text editor and write the first PHP code:
<?php echo"Learning PHP"; ?>

Save “Index.php” in the “…\program files\EasyPHP\www\mywebdir\” directory. Open the your best Explorer and type this: http://localhost/mywebdir/
You will see the “Learning PHP” words. You will find yourselves.

The links:
http://www.easyphp.org/index.php
http://en.wikipedia.org/wiki/List_of_PHP_editors
http://www.w3schools.com/PHP/default.asp