what is awt code example
Example 1: what is aws
Amazon Web Services (AWS) is a secure cloud services platform,
offering compute power, database storage and it helps Running
web and application servers
in the cloud to host dynamic websites.
in my company We use;
EC2:
- for Running application for different environments(Test, Dev enviroments).
- and also for Running Jenkins or any other application for testing purpose.
- and to Run load testing on the application.
We also use S3 (Simple Storage Service):
- It is Used for file storage, test data storage.
- It Can be used for part of data processing workflow.
- and also it Can also be used as code repository.
IAM (Identity and Access Management) is a web service that helps you
securely control access to AWS resources. You use IAM to control who is
authenticated (signed in) and authorized (has permissions) to use resources.
- I use IAM for Permission control of users, applications, typically
not configured by application team but by a cloud team.
RDS (Create a sample Postgresql database and connect using Dbeaver):
- is Used for database, launch database for different environments to
support the application.
Lambda:
- Serverless service that can provide quick and easy solution to run
your code without the involvement of EC2.
- Typically used for data processing incoming files.
Example 2: java awt tutorial
import java.awt.*;
public class Example2 {
Example2()
{
//Creating Frame
Frame fr=new Frame();
//Creating a label
Label lb = new Label("UserId: ");
//adding label to the frame
fr.add(lb);
//Creating Text Field
TextField t = new TextField();
//adding text field to the frame
fr.add(t);
//setting frame size
fr.setSize(500, 300);
//Setting the layout for the Frame
fr.setLayout(new FlowLayout());
fr.setVisible(true);
}
public static void main(String args[])
{
Example2 ex = new Example2();
}
}
Example 3: java awt tutorial
import java.awt.*;
/* We have extended the Frame class here,
* thus our class "SimpleExample" would behave
* like a Frame
*/
public class SimpleExample extends Frame{
SimpleExample(){
Button b=new Button("Button!!");
// setting button position on screen
b.setBounds(50,50,50,50);
//adding button into frame
add(b);
//Setting Frame width and height
setSize(500,300);
//Setting the title of Frame
setTitle("This is my First AWT example");
//Setting the layout for the Frame
setLayout(new FlowLayout());
/* By default frame is not visible so
* we are setting the visibility to true
* to make it visible.
*/
setVisible(true);
}
public static void main(String args[]){
// Creating the instance of Frame
SimpleExample fr=new SimpleExample();
}
}