Skip to content

utkarsh-chaurasia/Windows-based-Calculator-Using-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Windows-based-Calculator-Using-GUI

ABSTRACT

It is a windows-based application programme to calculate your every possible Addition, Substraction, Multiplication and Division to create this application I am using tha swing class of java.

So, what is Swing class ?

Swing in java is part of Java foundation class which is lightweight and platform independent. It is used for creating window based applications. It includes components like button, scroll bar, text field etc. Putting together all these components makes a graphical user interface. In this article, we will go through the concepts involved in the process of building applications using swing in Java.

INTRODUCTION OF JAVA SWING

Swing has about four times the number of User Interface [U1] components as AWT and is part of the standard Java distribution. By today’s application GUI requirements, AWT is a limited implementation, not quite capable of providing the components required for developing complex GUI’s required in modern commercial applications. The AWT component set has quite a few bugs and really does take up a lot of system resources when compared to equivalent Swing resources. Netscape introduced its Internet Foundation Classes [IFC] library for use with Java. Its Classes became very popular with programmers creating GUI’s for commercial applications.

Swing is a Set Of API ( API- Set Of Classes and Interfaces ) Swing is Provided to Design a Graphical User Interfaces Swing is an Extension library to the AWT (Abstract Window Toolkit) Includes New and improved Components that have been enhancing the looks and Functionality of GUI’s Swing can be used to build(Develop) The Standalone swing GUI Apps Also as Servlets And Applets It Employs model/view design architecture Swing is more portable and more flexible than AWT, The Swing is built on top of the AWT Swing is Entirely written in Java Java Swing Components are Platform-independent And The Swing Components are lightweight Swing Supports Pluggable look and feels And Swing provides more powerful components such as tables, lists, Scrollpanes, Colourchooser, tabbedpane, etc Further Swing Follows MVC Many programmers think that JFC and Swing is one and the same thing, but that is not so.

JFC contains Swing [A UI component package] and quite a number of other items:

Cut and paste: Clipboard support Accessibility features: Aimed at developing GUI’s for users with disabilities The Desktop Colors Features Has been Firstly introduced in Java 1.1 The Java 2D: it has Improved colors, images, and also texts support

FEATURES OF SWING CLASS

Pluggable look and feel Uses MVC architecture Lightweight Components Platform Independent Advance features such as JTable, JTabbedPane, JScollPane etc Java is a platform-independent language and runs on any client machine, the GUI look and feel, owned and delivered by a platform specific O/S, simply does not affect an application’s GUI constructed using Swing components

Lightweight Components: Starting with the JDK 1.1, its AWT supported lightweight component development. For a component to qualify as lightweight, it must not depend on any non-Java [O/s based) system classes. Swing components have their own view supported by Java’s look and feel classes

Pluggable Look and Feel: This feature enables the user to switch the look and feel of Swing components without restarting an application. The Swing library supports components look and feel that remains the same across all platforms wherever the program runs. The Swing library provides an API that gives real flexibility in determining the look and feel of the GUI of an application

SWING CLASSES HIERARCHY

SwingClasshierrarchy

USES

Lable :

JLabel is a class of java Swing . JLabel is used to display a short string or an image icon. JLabel can display text, image or both . JLabel is only a display of text or image and it cannot get focus . JLabel is inactive to input events such a mouse focus or keyboard focus. By default labels are vertically centered but the user can change the alignment of label.

Text Field :

JTextField is a part of javax.swing package. The class JTextField is a component that allows editing of a single line of text. JTextField inherits the JTextComponent class and uses the interface SwingConstants.

Button :

The Button class is used to create a Labeled by using button that has platform independent implementation. The application result is some action when the button is pushed. It inherits Abstract Button class.

Slider :

The Java Slider class is used to create the slider by using JSlider. JSlider is a part of Java Swing package . JSlider is an implementation of slider. The Component allows the user to select a value by sliding the knob within the bounded value . The slider can show Major Tick marks and also the minor tick marks between two major tick marks, The knob can be positioned at only those points.

TextArea :

JTextArea is a part of java Swing package . It represents a multi line area that displays text. It is used to edit the text . JTextArea inherits JComponent class. The text in JTextArea can be set to different available fonts and can be appended to new text . A text area can be customized to the need of user .

WORKING

image image image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages