KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sample > mtom > client > MTOMClient


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */

16 package sample.mtom.client;
17
18 import java.awt.Dimension JavaDoc;
19 import java.awt.HeadlessException JavaDoc;
20 import java.awt.Toolkit JavaDoc;
21
22 import javax.swing.JFrame JavaDoc;
23 import javax.swing.WindowConstants JavaDoc;
24
25 public class MTOMClient extends JFrame JavaDoc{
26
27     public MTOMClient(String JavaDoc title) throws HeadlessException JavaDoc {
28         super(title);
29
30         this.getContentPane().add(new UserInterface(this));
31         this.show();
32     }
33
34     public static void main(String JavaDoc[] args) {
35         MTOMClient form = new MTOMClient("MTOM Sample Client");
36         Dimension JavaDoc screenSize = Toolkit.getDefaultToolkit().getScreenSize();
37         form.setLocation(screenSize.width / 4 - 20,
38                 screenSize.height / 4);
39         form.setSize(screenSize.width / 2 - 80, screenSize.height / 2);
40         form.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
41         form.show();
42     }
43 }
44
Popular Tags