Technology Evangelist, Product Engineer, Analytics Expert
Most asked question during your interviews, different between
String s1 = "abc";
String s2 = new String("abc");
Another Swing program demo where I have used 3 layouts to show up the demo which are BorderLayout, BoxLayout, GridLayout.
A layout container that arranges and resizes its components to fit in five regions: north, south, east, west, and center.
The following is a simple example on how to read & write data from a file.
Colors in computers are generally made up using RGB mode i.e. Red, Green, Blue.
So in java if we generate random color values for RGB from 0 to 255 each we can make a whole new color out of it by passing this RGB to the color object.
One of the most basic starters program for demonstrating the proper use of Sockets in Java.
The following code makes use of Swing components to illustrate the Client GUI side and the Server side plays the role in Console mode.
In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n.
In-order to convert from Celsius to Fahrenheit, we have to apply a simple logic onto Celsius "Multiply by 9, then divide by 5, then add 32".
Our code provides a simple GUI, where the user has to enter the temperature in Celsius and after clicking on convert displays the Fahrenheit temperature below button in the form of JLabel.
In-order to convert from Fahrenheit to Celsius, we have to apply a simple logic onto Celsius "Deduct 32, then multiply by 5, then divide by 9".
Our code provides a simple GUI, where the user has to enter the temperature in Fahrenheit and after clicking on convert displays the Celsius temperature below button in the form of JLabel.
JTree is a control that displays a set of hierarchical data as an outline.
We will use it as a menu to navigate through various small applications we made previously.
The following code displays various usage of Swing Components.
This is done in my first Advanced Java practical assignment, so just thought would be useful for others.
Focuses on using various Swing Components and the GridBagLayout usage.