<MySQL DML practice 2 Part 2 | Java & Friends |Java Programming Part 1 >



Install, Test and Use jGRASP for Windows



Content:  Installing The jGRASP



The machine specifications used in this task are:

Pre requirement: Java JDK (required to compile and run Java programs). We already installed Java JDK in the previous tutorial.


Installing jGRASP


1.     Firstly, go tojgrasp.org to download a latest version of JGRASP for Windows. In this case we download Windows self-extracting exe file. If you don’t have JDK installed, you can download Windows self-extracting exe with JRE version.

2.     Double click the Windows self-extracting exe file as shown below.



1.        The JGRASP setup welcome page launched. Click Next.



2.        Accept the License Agreement, click the I Agree.



3.        Choose the JGRASP component to be installed. In this case we select a Standard install type. Click Next.



4.        Choose the installation location. If you want to change the destination folder, click the Browse button and find your new installation folder. In this case we choose the given path and folder. Click Next.



5.        Choose the Start menu folder for jGRASP shortcuts. We just accept the given shortcut name. Click Next.






6.        Choose file associations. Which file extensions you want to associate with jGRASP. In our case we choose file extensions as shown in the following Figure. Click Install.



7.        The installation of jGRASP begins.



8.        The installation is complete. Click Finish.



9.        The shortcuts were added to the Windows Start menu.



10.   You can see the jGRASP icon on the desktop. Double click the icon.



11.   The following nice splash screen launched.



12.   The following is the jGRASP IDE.



13.   Let open the previous simple Java code. Compile (   ) and run ( ).



// Helloworld.java


public class Helloworld



     // Just for fun!!! A classic Hello World program



     public static void main(String[] args)


          System.out.println("Hello bastard Java World!");





14.   See the output in the Run I/O window shown in the following Figure.



15.   jGRASP also can be used for other languages such as C, C++ and ADA.



16.   Let try a simple Java GUI program. Create a new java file named PushCounterPanel, click File > New > Java.



17.   Copy and paste the following code.



// PushCounterPanel.java

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;


public class PushCounterPanel extends JPanel


   private int count;

   private Jbutton push;

   private Jlabel label;


   public PushCounterPanel()


      count =0;

      push = new Jbutton("Push Me!");

      push.addActionListener(new ButtonListener());

      label = new Jlabel("Pushes: " + count);

      add (push);

      add (label);

      setPreferredSize(new Dimension(300,400));



      private class ButtonListener implements ActionListener


         public void actionPerformed(ActionEvent event)



            label.setText("Pushes: " + count);





18.   Then save this project to PushCounterPanel. Build this project (make sure there is no error(s)) without running it.

19.   Next, create a new Java file, copy and paste the following code sample and finally save it to PushCounter. Compile and run this file. The output is a window with a button, when pushed will generate a count as shown in the following Figure. The Java GUI programming normally will use Visual type IDE such as Java Studio or NetBeans.



20.   At this stage we are supposed to be able to do Java programming in more productive way. However JGRASP still lack many features though very nice and simple IDE. JGRASP also can be used for other languages development tool such as Ada, C and C++.



21.   Go tojgrasp.org to download a complete JGRASP tutorial in PDF (on the left menu) or download thetutorial in zip file. Next tutorials will provide you a fast track Java programming using the plain old Java codes.






jGRASP the Java IDE & Java Programming:Part 0 |Part 1 |Part 2 |Part 3 |Part 4

<MySQL DML practice 2 Part 2 | Java & Friends |Java Programming Part 1 >