Java Swing Essentials - GUI programming in Java made easy

Learn to create Graphical User Interface in Java in a easy & comprehensive way. Go GUI because console is too mainstream
3.4 (10 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,396 students enrolled
$20
Take This Course
  • Lectures 40
  • Contents Video: 3 hours
    Other: 2 mins
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2015 English

Course Description

Java is one of the modern programming languages available today. Its write once, run everywhere approach makes it a top choice for developers. Coding in Java is easy and hassle free. You may be already creating small programs in it. Why just be limited to console-based programming when you can actually learn to create multi-platform GUI(Graphical User Interface) based software.

This course is for Swing. Swing provides the default tools in Java to create rich Graphical User Interfaces. Mastering Swing will ensure that you can handle real world projects that involve complex GUI. This guide will go through each and every aspect of Swing one by one.

This Course consist of Quizzes and Assignments.

Quizzes will ensure you are learning the concepts properly. Assignments will ensure you are actually applying the concepts properly. Solutions are included in the form of tutorial lectures at the end of the course.

Bonus: New content will be made available to you time to time to keep this course fresh and latest at no extra cost.

What are the requirements?

  • You should be familiar with the basics of Java Programming Language. (Tip: If you know about creating Classes and Functions in Java, You got the basics...)
  • Its good, if you are familiar with Eclipse IDE because it will make your task of java programming very easy.

What am I going to get from this course?

  • Create rich Graphical User Interfaces in Java
  • Effectively use various Swing GUI Components
  • Make your own multi-platform Desktop Applications
  • Convert Console-based java programs to GUI based Application

What is the target audience?

  • This course is meant for people who know little bit of Java and further wants to explore and leverage the power of this Programming Language in creating standalone GUI based software applications.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Getting Started with Swing
03:05

You will learn, what is JFC. The features of JFC and a brief overview of Swing Packages

00:43

This video shows how a simple java program using Swing looks like and the Output of the program when you compile it.

09:29

Create your first swing application.
Learn to use the two basic swing components:

  1. JFrame (used to create application window)
  2. JLabel (used to display information inside the window)

Also learn how to call the GUI code from the main method of your Java code using SwingUtilities class

6 questions

Just a revision of what you studied so far in this section.

Section 2: Using Swing Components
03:49

You will learn about Swing Containers and Components and how they are used in the program.

05:43

In this lesson, you will learn to create an application's main window using the JFrame class of javax.swing .

04:00

In this lecture, you will learn to give a Title to your application window that will be displayed at the top and you will also learn how to set a minimum size so that the application window could only be resized to some specific dimension.

04:07

You will learn to set a default close operation to your Application Window. The default behaviour of the close button of the application window is to hide the window instead of terminating the application. After this lecture you will be able to override this default behaviour and make the application terminate when someone clicks on the close button of the application.

06:39

After you create a Window, its just blank... In this lecture, you will learn how to add three basic components(Label, Button and Text Field) to the Window and how to organise them using a layout(Flow Layout).

Revision
2 questions
Section 3: Buttons, Checkboxes, Radio Buttons & Toggle Buttons
04:20

In this lecture, you will learn How to create a button using the JButton class of java.swing.*
You will also, learn how to show a default text on the button and finally, How to display it in the application window.

01:57

In this lecture, you will learn how to create Checkboxes, showing text on them and displaying them in your application window.

06:13

In this lecture, you will learn to create radio buttons, displaying default text in them and finally adding it to the application window. You will also learn, how to use Button Group so that you can group the radio buttons which will make only one radio button selectable in the group at one point of time.

02:35

You will learn to create a Toggle Button. A Toggle button is similar to ON/OFF button. When you click on it, it hold its pressed state and when you click on it again, it comes back to its original state.

04:02

You will learn how to add an action listener to a button. It will allow a button to perform some task when someone clicks on it.

05:57

In this lecture you will learn to add an action listener to a checkbox. When the checkbox is checked, it will perform something and when the checkbox is not checked, it will perform something else, according to your requirement.

05:03

You will Learn to add action listeners to a group of Radio Buttons and control their functionality according to their selection.

03:17

You will learn how to add an action listener to a toggle button to check when the toggle button is in pressed state or in unpressed state and perform some action accordingly.

01:08

Assignment 1: Create a Java Swing Quiz Application. This video shows what you are expected to create and how your application is supposed to perform.

1 page

Assignment 1: Create a Java Swing Quiz Application. This document contains the problem statement and program requirement. Download or Print the document for your reference when to solve the problem.

Section 4: ComboBox(DropDown): Give users a choice to select values from a List
05:13

In this lecture, you will learn how to create an Un-editable ComboBox, i.e., a Dropdown that will hold a list of items and you can select one of them.

02:03

In this lecture, you will learn how to create an editable ComboBox that let the user to choose from a dropdown list as well as allow them to write free text in the field. This lecture is an extension of the previous lecture and only shows you how to convert the uneducable ComboBox into an Editable one.

03:24

In this lecture you will learn how to add an action listener to a ComboBox and getting the name of the selected item from it.

02:57

In this lecture you will learn, how to get the index of the selected item in the ComboBox. The index is usually used to get the position of the selected item in the ComboBox. Based on the index, you can program your application to do specific task, which is more practical in most situation that consist of dealing with hundreds of list items.

Revision
1 question
Section 5: Text Controls in Swing
05:34

In this lecture, you will learn how to create a Text Field in Swing. You will also learn how to use various constructors of the JTextField Class to create variety of Text Fields.

05:07

In this lecture, you will lean how to fetch the text from a text field and display it on a Label when someone clicks on a Button. You will also learn, How to set the Text Field Uneditable so that users can't type text in it.

03:15

In this lecture, you will learn How to create a Password Field to accept passwords from your user. A Password Field hides the actual characters from being displayed. You will also learn how to set an Echo Character, which will allow you to set a custom character( default is Asterisk character) to hide the actual password.

03:39

In this lecture, you will learn how to convert your Password Field into a Text Field. This is useful when you want to give your user a choice to display their typed password. So, we will add a checkbox called "Show Password" that will display the actual password when checked and will hide the characters when unchecked.

08:37

In this lecture, you will learn how to create a formatted text field and how to specify a format mask to it so as to limit the user to a specific format. It is helpful when you are trying to create a Serial Number field in your application.

03:47

In this lecture, you will learn how to create a JTextArea that will allow you to read multiple lines of text from the user. Its one step ahead of the JTextField you learned already.

Section 6: Spinner
04:48

In this lecture, you will learn how to create a spinner and use its number model. The number model will allow you to specify a current value to set to the spinner as well as minimum and maximum values. You can also specify the steps by which the values should increase or decrease in the number model.

02:38

In this lecture, you will learn how to use the Spinner List Model and display the strings in a string array as items in the Spinner.

05:15

In this lecture, you will learn to use the Date Model of the Spinner. It will allow you to create a Spinner with some default Date. The user can select in-between minimum and maximum dates. You can also specify steps at which your date should increase or decrease.

Section 7: Slider
06:11

In this lecture, you will learn how to create a slider which is a visual component that lets you choose a value in-between two integers by sliding a knob across the track. You will learn how to make it visually appealing by showing two type of tick marks, minor and major. Setting a Label at Major position gives the user a feedback at which value the slider is residing.

04:43

In this lecture, you will learn how to create a Label Table for Slider to display alternate text to it instead of the default number values it shows. This lecture requires the knowledge of creating Hash Tables in Java but I have briefly covered the basics which will be more than enough for this tutorial.

03:51

In this lecture, you will learn how to get the value from a slider and use that value in your application. In my example, I will get the value from the slider and based on whether the value is greater than or less than 5, it will set some text on a Label.

01:29

In this lecture, you will learn how to set a value to the slider to position its knob programatically based on condition.

01:47

In this lecture, you will learn how to create a Slider with vertical orientation.

Section 8: Assignment 1 (Solution) : Creating a Quiz Application
1 page

Assignment 1: Create a Java Swing Quiz Application. This document contains the problem statement and program requirement.

04:53

In this tutorial, I will show you how to Start the QuizApp Project in Eclipse and we will create the Application Window, give a title as well as give it a proper size.

08:37

In this tutorial, I will show you how to add the questions, options, submit button and the result label to our application window. This will complete the GUI for the QuizApp.

04:36

In this tutorial, I will show you how to add the action listener to the submit button in our Quiz Application to calculate the score and display the score in the Result Label.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Prasun Singha Roy, Web/App Developer & Founder of Xibeat Technologies

Prasun started programming at the age of 11. He holds a Bachelors degree in Computer Science and currently working as a Web/Application Developer in a MNC. He is also the founder and CEO of his startup, Xibeat Technologies that published their first app for android completely free of cost.

Prasun is very passionate about programming languages and UX design. He is comfortable with major programming language that include but not limited to C, C++, C#, Java, Python, PHP, HTML5, CSS3. He keep learning new technologies time to time. Currently he is working on his paper on a security algorithm that may get a patent in near future.

Being a self-learned person, Prasun got an extra edge over other people which allowed him to explore easy and effective way to solve a problem/challenge that is perceived tough by most of the people.

Prasun is not just limited to only programming languages and algorithms. He has keen interest in Sketching, Singing and Playing Guitar.

Finally, Prasun has decided to share his expertise with people around the world through his lineup of online courses across various domains. Hope you will enjoy learning with him!

Ready to start learning?
Take This Course