package ryhma57.gui;
import javax.swing.*;

public class Window extends JFrame {
    public Window() {
        this.setTitle("Application");
        /* set some default size so that window isn't 0x0 size */
        /*XXX we could load window geometry from config file */
        this.setSize(600, 400);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
}

@@ -40,45 +40,206 @@
 .*;%0A
-%0Apublic class Window extends JFrame %7B
+import java.awt.*;%0Aimport java.awt.event.*;%0A%0Apublic class Window extends JFrame implements ActionListener %7B%0A    static final String CREATE = %22create%22;%0A    static final String GENERATE = %22generate%22;%0A
 %0A   
@@ -465,16 +465,21 @@
         
+this.
 setDefau
@@ -510,16 +510,2372 @@
 _CLOSE);
+%0A%0A        this.createDialog();%0A    %7D%0A%0A    public void createDialog() %7B%0A        JPanel mainPane = new JPanel(new BorderLayout());%0A        JPanel labelPane = new JPanel(new GridLayout(0,1));%0A        JPanel inputPane = new JPanel(new GridLayout(0,1));%0A        JFormattedTextField input;%0A%0A        labelPane.add(new JLabel(%22Author:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Title:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Year:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Journal:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Volume:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Number:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        labelPane.add(new JLabel(%22Pages:%22));%0A        input = new JFormattedTextField();%0A        input.setColumns(10);%0A        inputPane.add(input);%0A%0A        //mainPane.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));%0A        mainPane.setBorder(BorderFactory.createTitledBorder(%22Create book%22));%0A        mainPane.add(labelPane, BorderLayout.CENTER);%0A        mainPane.add(inputPane, BorderLayout.LINE_END);%0A        this.add(mainPane, BorderLayout.NORTH);%0A%0A        JButton button;%0A        button = new JButton(%22Save%22);%0A        button.addActionListener(this);%0A        button.setActionCommand(CREATE);%0A        mainPane.add(button, BorderLayout.SOUTH);%0A%0A        button = new JButton(%22Generate BibTeX file%22);%0A        button.addActionListener(this);%0A        button.setActionCommand(GENERATE);%0A        this.add(button, BorderLayout.SOUTH);%0A    %7D%0A%0A    @Override%0A    public void actionPerformed(ActionEvent event) %7B%0A        if(event.getActionCommand() == CREATE) %7B%0A            System.out.println(%22Create the book in the backend%22);%0A        %7D else if(event.getActionCommand() == GENERATE) %7B%0A            System.out.println(%22Generate the bibtext file in the backend%22);%0A        %7D
 %0A    %7D%0A%7D

Create basic ui for creating book reference.