Skip to main content

Featured Post

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

JFC, Toolkit and Software Tiers used in GUI Programming: Introduction to JAVA

In JAVA, GUI features are supported via JFC. JFC is short for Java Foundation Classes, which encompass a group of features for building graphical user interfaces (GUI's) and adding rich graphics functionally and interactivity to Java applications. One major feature of JFC is Swing API, which includes everything from buttons to split panes to tables and every other functionally to create a GUI application.

Our later articles will describe, how to build GUI programs using Swing API’s features. The GUI programs that will create in Java will contain three tiers of software.
  • Graphical components make up the GUI such as a button or text box or a menu etc. Each graphical components has certain Properties. A property is a characteristic of an object such as its size, colour, title etc. You’ll learn about basics graphical components that Java’s Swing API offers, later in the articles.
  • Events Listeners that get notified about the events and respond to them.
  • The graphical Event Handler that do the work for the user in case the event occurs.
The graphical components are those like the one listed above. You can use them as they are, or extend them into your own classes. Event listeners are registered with GUI objects. In case of occurrence of an event, the objects notifies its event listeners them invokes event-handler method then executes the Java code written in it.

Java GUI toolkit

You know that a GUI in Java is created with at least three kinds of objects: components, events and listeners. A components is an object that defines a screen elements such as a push button, text field, scroll bar, menu, etc. the components that you can use for creating GUI in Java are available through Swing API.
A component is an object that defines a screen element such as a push button, text field, scroll bar, menu etc.

Types of Graphical Components

The graphical controls that you put in GUI applications are broadly of two types: the Container control and the Child control.

The container is control that can hold other control within it e.g. a Panel (there can be multiple controls inside a Panel) or Panes or simply frame (you can put so many controls on it). Control inside a container are known as a child controls. The child controls can exist completely inside their containers. That means you can’t move them outside their container and if try to drag them beyond and the boundary of their container, part of the control gets hidden. When you delete a container control, all its child controls automatically get deleted.

Do you know that Java GUI programming demands that all swing components s must contained in a container? A GUI application must contain a top-level container that can hold other controls in it.
A control is also known as a widget (short for window gadget). You can think of widget/ control as an element of a GUI that can be seen and that display an information and with user, e.g., a window, text field, frame etc. are widgets.
Graphical Controls of Swing

Comments

Popular Post

Polynomial representation using Linked List for Data Structure in 'C'

Polynomial representation using Linked List The linked list can be used to represent a polynomial of any degree. Simply the information field is changed according to the number of variables used in the polynomial. If a single variable is used in the polynomial the information field of the node contains two parts: one for coefficient of variable and the other for degree of variable. Let us consider an example to represent a polynomial using linked list as follows: Polynomial:      3x 3 -4x 2 +2x-9 Linked List: In the above linked list, the external pointer ‘ROOT’ point to the first node of the linked list. The first node of the linked list contains the information about the variable with the highest degree. The first node points to the next node with next lowest degree of the variable. Representation of a polynomial using the linked list is beneficial when the operations on the polynomial like addition and subtractions are performed. The resulting polynomial can also

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

Memory representation of Linked List Data Structures in C Language

                                 Memory representation of Linked List              In memory the linked list is stored in scattered cells (locations).The memory for each node is allocated dynamically means as and when required. So the Linked List can increase as per the user wish and the size is not fixed, it can vary.                Suppose first node of linked list is allocated with an address 1008. Its graphical representation looks like the figure shown below:       Suppose next node is allocated at an address 506, so the list becomes,   Suppose next node is allocated with an address with an address 10,s the list become, The other way to represent the linked list is as shown below:  In the above representation the data stored in the linked list is “INDIA”, the information part of each node contains one character. The external pointer root points to first node’s address 1005. The link part of the node containing information I contains 1007, the address of