# Class Utils

java.lang.Object
jam.util.Utils

public class Utils extends Object

## Constructor Summary

Constructors
Constructor
Description
`Utils()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`centerComponent(Component component, Component reference)`
Center a component in reference to another, if the reference is null or not visible the screen is used as reference
`static double`
`getDoubleFromTextField(JTextField textField, double defaultValue)`
`static String`
`getEnv(String name)`
`static void`
`showDefaultCursor(Component component)`
`static void`
`showPredefinedCursor(Component component, int cursor)`
`static void`
`showWaitCursor(Component component)`

### Methods inherited from class Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Utils

public Utils()

## Method Details

### getDoubleFromTextField

public static double getDoubleFromTextField(JTextField textField, double defaultValue)

Returns:
  the value in a text field as a double. If the text field contents do not represent a valid double then the default value is inserted into the text field and returned.

### centerComponent

public static void centerComponent(Component component, Component reference)
Center a component in reference to another, if the reference is null or not visible the screen is used as reference

### showWaitCursor

public static void showWaitCursor(Component component)

### showPredefinedCursor

public static void showPredefinedCursor(Component component, int cursor)

### showDefaultCursor

public static void showDefaultCursor(Component component)

### getEnv

public static String getEnv(String name)