Maximize window

This code should give you a start:

You'll need to figure out how to capture your triggers for maximizing, get the parent JFrame of the window, and then just use this part, where window is the parent JFrame you want to maximize:

window.setExtendedState(JFrame.NORMAL)