Pages

Fundamentals of Java Swing

JAVA SWING - Tutorial 1


     This tutorial will help you to understand basics of Java Swing. Mainly we use java swing to create GUI(Graphically User Interface) Applications. You can easily create your application using popular IDE's like Net Beans, Eclipse.etc. But in this tutorial i am going to use Text Editor to coding and cmd to compile my program. So, lets start...

      In this tutorial we are going to develop small login box using java swing.

    so, before start coding our application we need to import "javax.swing" library to our program. 

        import javax.swing.*

     Here is definitions of some keywords we frequently use in Java Swing,

  JFrame : Use this to create instance of JFrame. Simply this represent window of our application.
  JPanel  : This is same as <div> tag in HTML. Inside this, we can create Buttons, Text Fields, Forms.etc