Wednesday, March 18, 2020

NodeJS


NodeJS is an open-source and cross-platform In JavaScript Runtime environment. It’s also run in a single process without creating a new thread for every request. It is the most popular project tool among developers.

Tuesday, March 10, 2020

New concepts of ES6

What is ES6 ?

It is an updated version of JavaScript that easier to use than older versions. It was released in 2011.

Older JS version vs ES6

1. Constant Variable
   
Constants are the values that can be defined only once. It's introduced to ES6. Therefore older versions don't have constant type variables.


* When run this in the console there will error. Because we can't add different values to the same constant variable.












2. Arrow Function

This type of function declaration. normally we were used to declaring the function with "function" keyword, return keyword and brackets. Inside the brackets, we have implemented the function. But in ES6 we can only use "=>", brackets and return keyword.

 If the function has a single statement you don't need to always use brackets and return function.

*Although try to use "const" rather than "var". because of a function expression always a constant value.


Wednesday, February 12, 2020

Make transparent JPanel using Java Swing in netbeans

Swing is the most usual GUI widget toolkit that uses in java. It's also easier to follow, even for a beginner.

When we are making an application we have to use JPanel to attach any other components to the window. To make this jpanel more styler we can make the jpanel transparent.  

There are several steps to follow to make transparent the JPanel in Netbeans.

  1. Drag and drop a JPanel into the JFrame Area.
  2. Use the following code to change the background details of the jpanel.
         jpanelname.setBackground(new Color(0,0,0,0));

             
                                                                            Image:-ITP Project  2019
  There are several numerical parts in the Color method. First 3 numerical parts for the color you chose. And the last part is the density of the transparency. the value should be between 0-250. the higher value you add, getting decrease transparency.

Example:-for Lower value

                                                                                      Image:-ITP Project  2019
                                                                          
            

                                                                                                      Image:-ITP Project  2019
                   

             for Higher value

                                  Image:-ITP Project  2019

                                                                    Image:-ITP Project  2019

The transparent effect only works when the file is running. You won't be able to see this effect in the design window.