1 / 4

Swing in Java

Swing provides graphical user interface (GUI) components to develop Java applications with a rich set of graphics such as windows, buttons, checkboxes, etc. What is a GUI? Before we define a GUI, let us first explain a user interface (UI).

Ducat1
Download Presentation

Swing in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to Ducat India Apply Now Language | Industrial Training | Digital Marketing | Web Technology | Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big Data | Cloud Computing Call us: 70-70-90-50-90 www.ducatindia.com

  2. Swing in JAVA What is Swing? Swing provides graphical user interface (GUI) components to develop Java applications with a rich set of graphics such as windows, buttons, checkboxes, etc. What is a GUI? Before we define a GUI, let us first explain a user interface (UI). A program does three things: Accepts inputs from the user Processes the information, and Produces outputs A user interface provides a means to exchange information between a user and a program, regarding inputs and outputs. In other words, a user interface defines the way the interaction between the user and a program takes place. Typing text using a keyboard, selecting a menu item using a mouse, or clicking a button can provide input to a program. A program’s output can be displayed on a computer monitor in the form of character-based text, a graph such as a bar chart, a picture, etc.

  3. You have written many Java programs. You have seen programs where users had to provide inputs to the program in the form of text entered on the console, and the program would print the output on the console. A user interface where the user’s input and the program’s output are in text form is a character-based user interface. A GUI lets users interact with a program using graphical elements called controls or widgets, using a keyboard, a mouse, and other devices. The Simplest Swing Program Let’s start with the simplest Swing program. You will display a JFrame, which is a top-level container with no components in it. To create and display a JFrame, you need to do the following: Create a JFrame object. Make it visible. To create a JFrame object, you can use one of the constructors of the JFrame class. One of the constructors takes a string, which will be displayed as the title for the JFrame. Classes representing Swing components are in the javax. swing package, so is the JFrame class. The following snippet of code creates a JFrame object with its title set to “Simplest Swing”: Read More: https://tutorials.ducatindia.com/java/swing-in-java/

  4. Thank You. Ducat India 70-70-90-50-90 info@ducatindia.com www.ducatindia.com

More Related