Question: I'm trying to create a different `actionPerformed` when `Shift` is held down while pressing a JButton, but when I use:
`event.isShiftDown;`
my program does not compile because it does't recognise it.

Answer: 
Basically you need to bitwise-and the `ActionEvent#getModifiers` result

```
if ((e.getModifiers() & InputEvent.SHIFT_MASK) != 0) {
    // Shift is down...
}

```
As an alternative to checking the event modifiers directly, consider using a different [`Action`](http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html) for each state of the shift key. You can supply the desired mask to the `KeyStroke` used in your [*key binding*](http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html), as outlined [here](https://stackoverflow.com/a/12521353/230513). A related example using `getMenuShortcutKeyMask()` is shown [here](https://stackoverflow.com/a/5129757/230513).