Program to display content of textbox using button in

In this program we are going to display the content of Textbox on a Label on Button Click.

Program UI :

Screenshot (8).png

Program Code:

Public Class programmingfromscratch

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label3.Text = “Hello, ” + TextBox1.Text + ” You Study in ” + TextBox2.Text + “!”

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Label3.Text = “” ‘
End Sub

End Class


Screenshot (9).png


Program to find Area of Circle in java.

Program Code:

// Program to find the area of circle.
public class AreaofcirclePFS

public static void main(String[] args)
double circle_radius=20;        //Radius Given
double pi=3.14159;                //Value of PI
double circle_area=pi*circle_radius*circle_radius;
System.out.println(“\n Area of Circle is = “+ circle_area);




Screenshot (6).png

Writing and Running Your Program in Java

1.Launch or Run  Eclipse.

2. Go to Eclipse Eclipse menu bar,choose File⇒New⇒Java Project

A New Java Project dialog box appears

3.In the New Java Project Dialog box,type a name for your new project and then click Finish.                                                          Screenshot (3).png

4.Select your project in the Package Explorer.

5.From  Eclipse’s main menu,choose File⇒New⇒Class    

6.In the New Java Class Dialog box Name field,type the name of your new class.  

  Put a check mark in the public static void main(String[]args) checkbox.   

7.Click Finish.                                                                              


Screenshot (5)