
public float getLayoutAlignmentY(Container target);
public void invalidateLayout(Container target);
public java.awt.Dimension maximumLayoutSize(Container target);
}
Hierar chy: Object→ Over layLayout(java.awt.LayoutManager2(java.awt.LayoutManager), Serializable)
ProgressMonitor Ja va 1.2
javax.swing
This class implements a progr ess monitor. After creating a ProgressMonitor,aprogram
periodically calls setProgress() to indicate its progr ess toward the completion of a task.
Unless progr ess is quite rapid, the ProgressMonitor displays a dialog box that uses a JPro-
gressBar to display progr ess to the user. Call setNote() to set the text to display in the dia-
log box. You can also specify a permanent title or heading for the dialog box with the
second argument to the constructor. The ProgressMonitor dialog box automatically closes
when the progress pr operty reaches the value of the maximum pr operty. If you want to
close it before the task completes, call close().
ProgressMonitor suf fers fr om an important flaw: if the user clicks the Cancel buttons in
the dialog box, the dialog is dismissed. Unfortunately, the dialog does not fire any
event to indicate that this has happened, so your program must call isCancelled() each
time it calls setProgress(),todeter mine whether the user has requested that the operation
be cancelled. A related flaw is that the dialog box contains an extraneous Okay button ...