Daily Archives: 28, April, 2008

Sorting Algorithms

We all know that Quicksort is one of the fastest algorithms for sorting. It’s not often, however, that we get a chance to see exactly how fast Quicksort really is. The following applets chart the progress of several common sorting algorithms while sorting an array of data using in-place algorithms. This means that the algorithms […]

Java FAQ

Get free “1000 Java Tips eBook” I just started with Java and found very strange that in simple operation likeMemory Interceptor Library Nokia pushing mobile development at Eclipse Q: Can I pass a function as a parameter in Java? If so, how? Q: How can I change the default icon on application window (java cup) […]

Z-order: The difference between lightweight and heavyweight components

Swing components are referred to as lightweights while AWT components are referred to as heavyweights. The difference between lightweight and heavyweight components is z-order: the notion of depth or layering. Each heavyweight component occupies its own z-order layer. All lightweight components are contained inside heavyweight components and maintain their own layering scheme defined by Swing. […]

MVC architecture

MVC architecture MVC is a well known object-oriented user interface design decomposition that dates back to the late 1970s. Components are broken down into three parts: a model, a view, and a controller. Each Swing component is based on a more modern version of this design. Before we discuss how MVC works in Swing, we […]

Swing

Swing is a large set of components ranging from the very simple, such as labels, to the very complex, such as tables, trees, and styled text documents. Almost all Swing components are derived from a single parent called JComponent which extends the AWT Container class. Thus, Swing is best described as a layer on top […]

AWT

AWT (the Abstract Window Toolkit) is the part of Java designed for creating user interfaces and painting graphics and images. It is a set of classes intended to provide everything a developer requires in order to create a graphical interface for any Java applet or application. Most AWT components are derived from the java.awt.Component class […]

AWT Vs. Swing

(Abstract Windowing Toolkit) A class library from Sun that provides an application framework and graphical user interface (GUI) routines for Java programmers. AWT was the first user interface development system included in the Java Foundation Classes (JFC). In 1997, Swing was introduced, which provides more capability and is written entirely in Java. See JFC, AFC […]

Swing Packages

javax.swing – Provides a set of “lightweight” (written in Java with no native code) components that, to the maximum degree possible, work the same on all platforms. javax.swing.border – Provides classes and interfaces for drawing specialized borders around a Swing component. javax.swing.colorchooser – Contains classes and interfaces used by the JColorChooser component. javax.swing.event – Provides […]

JCalendar: Tutorial

JCalendar is the generic name for two Java components: one is called JCalendar and the other is called JCalendarCombo. They both share common features, particularly the ability to select a date and/or time. The former accomplishes this with a panel and the latter with a combo-box. Creating the Components The simplest constructors for JCalendar and […]

JCalendar

The main features of JCalendar are: Easy to use. Can input the date, time or both. Can set entry format for time selection. Can optionally display today’s date. Can use as a panel (JCalendar) or combo-box (JCalendarCombo). The combo-box can be editable. Can select date format for selected date in combo-box. Can select the font […]