The menu component in Swing enables you to list various available options.JMenubar in swing is set on the top area of the window displaying the GUI for a Java application.
If we want to find out determine which fonts are available in a system, we need to create an instance of java.awt.GraphicsEnvironment by calling its static method getLocalGraphicsEnvironment().
setBackground() is used to set the background color of the JFrame.awt package is used to set the color of the JFrame.AWT contains large number of classes and methods that allows yout o create and manage Windows.
Mathmetical function are those functions which are used for calculation like sin(X) used to find squareroot of the number. To use the math library functions, we must include the header file
“#include<math.h> “ in C++.
In Line Animation we use drawLine() to draw a line.In this example we use repaint() to change the color of the line.We can refresh the colors of the line.
Graphics is one of the important feature of Java.By using Graphics we can draw different shapes like Lines,Arcs,Polygon,Oval etc. We can also use different colors to display text or any shape .The graphics class defines a number of drawing functions.
Group of Characters make the String.We use single quotes(‘’)for character and double quotes(“”) for String. Here,Conversion means how we convert the integer number into binary.
String is a group of characters.If we want to print any string we have three methods first is by using byte(for ASCII CODE) second is char c(for single single character) and third is by using String(complete word).
The continue statement is used to “continue “ the loop with its next iteration.It skips any remaining statements in the current iteration and immediately passes the control to the next iteration.
The for loop provides a more consice and easy loop structure. The for loop combines all the phases of a loop in single step means initialization,condition ,inc/dec phases.