public class Beeper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MB_ICONASTERISK
SystemAsterisk sound.
|
static int |
MB_ICONEXCLAMATION
SystemExclamation sound.
|
static int |
MB_ICONHAND
SystemHand sound.
|
static int |
MB_ICONQUESTION
SystemQuestion sound.
|
static int |
MB_OK
SystemDefault sound.
|
| Constructor and Description |
|---|
Beeper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
beep(long frequency,
long duration) |
static boolean |
messageBeep(int type)
Plays a predefined sound.
|
public static final int MB_ICONHAND
public static final int MB_ICONQUESTION
public static final int MB_ICONEXCLAMATION
public static final int MB_ICONASTERISK
public static final int MB_OK
public static boolean beep(long frequency,
long duration)
frequency - frequency of the sound, in Hertz. Must be in the range between
37 through 32,767.duration - duration of the sound, in milliseconds.LastError.getValue()public static boolean messageBeep(int type)
type - sound type, one of the MB_XXX values.LastError.getValue()