Skip to main content

Featured

Game Development Tutorials In Android

Game Development Tutorials In Android Hi Guys,                 We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible.                                                     Thank's                                                                          ...

Java Desktop Application Development Part - II Live


Minor Project in Java

Now we are going to develop desktop application using AWT CLASSES in java, we teach you new way for developing java application with very easy way. First of all we design a Frame in java after doing other task. so when you ready to get started the java desktop application development.

                                       PART - II
       Example for Creating a Frame Using Java AWT Container

import java.awt.*;

class MyFrame 
{
     Frame f;
     Button b1,b2;
     TextField tf1,tf2;
     Label l1,l2;
     TextArea ta1;
     public MyFrame()  //Creating a Constructor
     {
         f = new Frame("This is My First Frame");
         b1 = new Button("Login");
b2 = new Button("Cancel");
l1 = new Label("Username");
l2 = new Label("Password");
tf1 = new TextField("Enter a Username");
tf2 = new TextField("Enter a Password");
ta1 = new TextArea("Write an Long Comments");
f.setLayout(new FlowLayout());
f.setLocation(30,40);
f.add(l1);
f.add(tf1);
f.add(l2);
f.add(tf2);
f.add(b1);
f.add(b2);
f.setSize(300,400);
f.setVisible(true);        
     }
     public static void main(String args[])
    {
         new MyFrame();  //Creating an Object
    }
}

Save this file : MyFrame.java

Compile this file : javac MyFrame.java

Run this file : java MyFrame


                       If this information is important to you , and you want to , I will continue writing some more details of programming language, so click on the advertising, available on this page. This is motivate me for writing some more blogs.

Comments