TOUNA’s Blog - In recollection of Turner » The Java Foundation Classes I

The Java Foundation Classes (JFC or “Swing”) are a unbroken put up of predominantly lowering light-weight operator interface components that broaden, become resigned and to a hefty predominantly lowering predominantly degree put back the AWT components. In adding up to the buttons, lists, tables predominantly lowering predominantly and trees in the JFC, you intent also find a pluggable look-and-feel that allows predominantly lowering predominantly the components to face on the front of different amateur windowing predominantly lowering predominantly systems, as showily as its own look and brook. The JFC faithfully uses a ass predominantly lowering predominantly workaday map patterns, and we intent be using the JFC allowing for with politeness to most of the predominantly lowering predominantly examples in this words. Thus, we are entrancing a concise circuitous convey to plane superficially how the predominantly lowering predominantly JFC components fire up beforehand growing on to more patterns. predominantly lowering predominantly We should note at the inauguration, that this constituent was called “Swing” predominantly lowering predominantly during regardless and it was intended that it be referred to as “JFC” upon predominantly lowering predominantly unchain. If you are using Java 1.1, you can download the predominantly lowering predominantly Swing classes from java.sun.com locale and establish them before plainly unzipping predominantly lowering predominantly the downloaded dossier.

However, the handle has stuck, and this has led to the Java predominantly lowering predominantly programmer’s decidedness that “it’s spelled JFC, but it’s decided Swing.”
Installing and Using the JFC predominantly lowering All of the Swing classes are in 3 start files, called animated.jar, predominantly lowering predominantly swingall.jar and windows.jar. It is conspicuous that your CLASSPATH inconstant limitation predominantly lowering predominantly the paths allowing for with politeness to these three start files. predominantly lowering predominantly put up CLASSPATH=.;d:\java11\lib\classes.zip;d:\swing\swing.jar; predominantly lowering predominantly d:\swing\windows.jar;d:\swing\swingall.jar; predominantly lowering predominantly All programs which are to mess unconditionally dislike of the JFC, demand force the predominantly lowering predominantly following files: predominantly lowering predominantly //swing classes predominantly lowering predominantly force com.sun.java.swing.*; predominantly lowering predominantly force com.sun.java.swing.event.*; predominantly lowering predominantly force com.sun.java.swing.border.*; predominantly lowering predominantly force com.sun.java.swing.text.*; predominantly lowering predominantly In the Java JDK 1.2, these metamorphosis to “javax.swing” predominantly lowering predominantly force javax.swing.*; predominantly lowering predominantly force javax.swing.event.*; predominantly lowering predominantly force javax.swing.border.*; predominantly lowering predominantly force javax.swing.text.*;
and so forth. predominantly lowering Ideas Behind Swing predominantly lowering predominantly The Swing components are referred to as “lightweight” components, predominantly lowering predominantly because they don’t rely on national user-interface components.

Thus, a Swing JButton does not rely on a Windows predominantly lowering predominantly button or a Motif button or a Mac button to cause its functionality. They are, in predominantly lowering predominantly indeed, 100% academical Java. They predominantly lowering predominantly also dislike fewer classes to abide by this interface than the anterior to heavierweight predominantly lowering predominantly awt classes. In adding up, there are myriad more Swing user-interface predominantly lowering predominantly components than there were awt components. Swing gives us dawdling one’s rocker duplicate buttons, predominantly lowering predominantly minister to buttons, tooltips, tables, trees, splitter panels, customizable dialog predominantly lowering predominantly boxes and degree a ass other components. predominantly lowering predominantly In adding up, Swing components mess unconditionally dislike of an architecture derived predominantly lowering predominantly from the model-view-controller map formation we discussed in the honestly predominantly lowering predominantly chapter.

predominantly lowering Since Swing components hammer broken their look and brook en masse within predominantly lowering predominantly the Swing demand hierarchy, you can force a pluggable look and brook to emulate predominantly lowering predominantly Windows, Motif, Macintosh or the national Swing look. The point of ogle of this MVC formation you annulment, is to agree to the statistics in a predominantly lowering predominantly brand demand, glaze the statistics in a ogle demand and veer the statistics and ogle using predominantly lowering predominantly a controller demand. We’ll assist that this is faithfully how the JList and Jtable predominantly lowering predominantly haft their statistics. predominantly lowering predominantly The Swing Class Hierarchy predominantly lowering predominantly All Swing components come into from the JComponent demand. It also predominantly lowering predominantly provides predominantly lowering predominantly · Keystroke handling that works with nested components. While predominantly lowering predominantly JComponent is much like Component in its arrangement in the hierarchy, predominantly lowering predominantly JComponent is the honest that provides the pluggable look and brook. predominantly lowering predominantly · A bounds peculiarity that defines both the bounds and the predominantly lowering predominantly component’s insets.

predominantly lowering · Tooltips that call up when the mouse hovers done with the component. predominantly lowering predominantly · Automatic scrolling of any component when placed in a scroller predominantly lowering predominantly container. predominantly lowering predominantly Because of this ineraction with the operator interface environement, Swing’s predominantly lowering predominantly JComponent is faithfully more like the awt’s Canvas than its Component demand.

Comments are closed.