1   package demo9;
2   
3   import java.awt.BorderLayout;
4   import java.awt.EventQueue;
5   
6   import javax.swing.JFrame;
7   import javax.swing.JPanel;
8   import javax.swing.border.EmptyBorder;
9   
10  /**
11   * Frame KonvoluutioPanelille
12   * @author vesal
13   * @version 6.11.2010
14   */
15  public class KonvoluutioFrame extends JFrame {
16  
17      private static final long serialVersionUID = 1L;
18  
19      private JPanel contentPane;
20  
21      /**
22       * Launch the application.
23       */
24      public static void main(String[] args) {
25          EventQueue.invokeLater(new Runnable() {
26              public void run() {
27                  try {
28                      KonvoluutioFrame frame = new KonvoluutioFrame();
29                      frame.setVisible(true);
30                  } catch (Exception e) {
31                      e.printStackTrace();
32                  }
33              }
34          });
35      }
36  
37      /**
38       * Create the frame.
39       */
40      public KonvoluutioFrame() {
41          setTitle("Konvoluutio");
42          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
43          setBounds(100, 100, 774, 618);
44          contentPane = new JPanel();
45          contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
46          contentPane.setLayout(new BorderLayout(0, 0));
47          setContentPane(contentPane);
48          
49          KonvoluutioPanel konvoluutioPanel = new KonvoluutioPanel();
50          contentPane.add(konvoluutioPanel, BorderLayout.CENTER);
51      }
52  
53  }
54