de.michab.mack
Class Utilities
java.lang.Object
de.michab.mack.Utilities
- public class Utilities
- extends java.lang.Object
A set of utility classes. Basically I hate that, but some things are
just functions.
Method Summary |
static void |
computeMnemonicsFor(javax.swing.JComponent[] comps)
Dynamically sets the mnemonics on the JLabel instances in the passed set
of JComponents. |
static int |
showOptionDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)
This is equivalent to the JOptionPane.showOptionDialog() call with the
same parameters, but solves a problem in jdk 1.4 with the passed
initialValue argument. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utilities
public Utilities()
showOptionDialog
public static int showOptionDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)
- This is equivalent to the JOptionPane.showOptionDialog() call with the
same parameters, but solves a problem in jdk 1.4 with the passed
initialValue
argument. This is not properly handled in the
JDK.
The code below is from the version
@(#)JOptionPane.java 1.81 03/01/23
with a slight
modification. Instead of trying to set the initial value nothing is done
which results in the same behavior as 1.3. Setting the initial value is
not possible how it is done in the original code, would require a major
rework.
computeMnemonicsFor
public static void computeMnemonicsFor(javax.swing.JComponent[] comps)
- Dynamically sets the mnemonics on the JLabel instances in the passed set
of JComponents.
- Parameters:
comps
- The set of components to process.