from java.lang import System
from javax.swing import *
from java.awt import Color

# prompt the user for their name
name = JOptionPane.showInputDialog("What is your name?")

# set the name using the frame variable we put in the interpreter
frame.setName(name)

# we can use the other objects we put in the interp too
button.setBackground(Color.yellow)

frame.setSize(300,250)

# define a method for the actionlistener to use
def exit(event=None):
    System.exit(0)

# we can even add new stuff
button2 = JButton("Exit", actionPerformed=exit)
panel.add(button2)