Source Code Cross Referenced for BoilerPlate.java in  » XML-UI » XUI » net » xoetrope » samples » counterexample » ide » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML UI » XUI » net.xoetrope.samples.counterexample.ide 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.xoetrope.samples.counterexample.ide;
002:
003:        import java.awt.Color;
004:        import java.awt.Dimension;
005:        import java.awt.Panel;
006:        import java.awt.Rectangle;
007:        import java.awt.SystemColor;
008:        import java.awt.event.ActionEvent;
009:        import javax.swing.BorderFactory;
010:        import javax.swing.ImageIcon;
011:        import javax.swing.JButton;
012:        import javax.swing.JLabel;
013:        import javax.swing.JPanel;
014:        import javax.swing.JScrollPane;
015:        import javax.swing.JTextArea;
016:        import javax.swing.JTextField;
017:
018:        public class BoilerPlate extends Panel {
019:            JLabel jLabel1 = new JLabel();
020:            JPanel jPanel1 = new JPanel();
021:            JPanel jPanel2 = new JPanel();
022:            JPanel jPanel3 = new JPanel();
023:            JButton okBtn = new JButton();
024:            JButton cancelBtn = new JButton();
025:            JTextField WidthEdit = new JTextField();
026:            JLabel jLabel2 = new JLabel();
027:            JTextField HeightEdit = new JTextField();
028:            JButton jButton1 = new JButton();
029:            JLabel jLabel3 = new JLabel();
030:            JLabel jLabel4 = new JLabel();
031:            JLabel AreaText = new JLabel();
032:            JTextArea jTextArea1 = new JTextArea();
033:            ImageIcon imageIcon1 = new ImageIcon();
034:            JScrollPane jScrollPane1 = new JScrollPane();
035:
036:            public BoilerPlate() {
037:                try {
038:                    jbInit();
039:                } catch (Exception e) {
040:                    e.printStackTrace();
041:                }
042:            }
043:
044:            private void jbInit() throws Exception {
045:                jLabel1.setFont(new java.awt.Font("SansSerif", 1, 24));
046:                jLabel1.setForeground(Color.red);
047:                jLabel1.setText("Area Calculator");
048:                jLabel1.setBounds(new Rectangle(12, 22, 213, 23));
049:                this .setBackground(Color.white);
050:                this .setLayout(null);
051:                jPanel1.setBackground(Color.white);
052:                jPanel1.setBorder(BorderFactory.createEtchedBorder());
053:                jPanel1.setBounds(new Rectangle(12, 68, 228, 303));
054:                jPanel1.setLayout(null);
055:                jPanel2.setBackground(Color.white);
056:                jPanel2.setBorder(BorderFactory.createEtchedBorder());
057:                jPanel2.setBounds(new Rectangle(248, 67, 233, 303));
058:                jPanel2.setLayout(null);
059:                jPanel3.setBackground(Color.white);
060:                jPanel3.setBorder(BorderFactory.createLineBorder(Color.black));
061:                jPanel3.setBounds(new Rectangle(12, 378, 470, 47));
062:                jPanel3.setLayout(null);
063:                okBtn.setBackground(SystemColor.control);
064:                okBtn.setBounds(new Rectangle(336, 11, 49, 25));
065:                okBtn.setText("OK");
066:                okBtn.addActionListener(new BoilerPlate_okBtn_actionAdapter(
067:                        this ));
068:                cancelBtn.setBackground(SystemColor.control);
069:                cancelBtn.setBounds(new Rectangle(392, 11, 67, 25));
070:                cancelBtn.setText("Cancel");
071:                cancelBtn
072:                        .addActionListener(new BoilerPlate_cancelBtn_actionAdapter(
073:                                this ));
074:                WidthEdit.setText("10");
075:                WidthEdit.setBounds(new Rectangle(160, 180, 57, 21));
076:                jLabel2.setText("Height");
077:                jLabel2.setBounds(new Rectangle(27, 212, 34, 15));
078:                HeightEdit.setText("10");
079:                HeightEdit.setBounds(new Rectangle(160, 205, 57, 21));
080:                jButton1.setBounds(new Rectangle(114, 230, 103, 25));
081:                jButton1.setText("Calculate");
082:                jButton1
083:                        .addActionListener(new BoilerPlate_jButton1_actionAdapter(
084:                                this ));
085:                jLabel3.setText("Width");
086:                jLabel3.setBounds(new Rectangle(27, 190, 34, 15));
087:                jLabel4.setText("Area");
088:                jLabel4.setBounds(new Rectangle(27, 269, 34, 15));
089:                AreaText.setBackground(Color.white);
090:                AreaText.setForeground(Color.red);
091:                AreaText.setText("100");
092:                AreaText.setBounds(new Rectangle(183, 264, 34, 15));
093:                jTextArea1.setFont(new java.awt.Font("SansSerif", 0, 16));
094:                jTextArea1.setForeground(new Color(0, 0, 176));
095:                jTextArea1
096:                        .setMaximumSize(new Dimension(2147483647, 2147483647));
097:                jTextArea1.setPreferredSize(new Dimension(60, 170));
098:                jTextArea1
099:                        .setText("Once upon a time there was a simple programmer who wished to calculate "
100:                                + "the area of a room, but being a very slow mathematician he decide "
101:                                + "to create a calculator. Here is what he did.");
102:                jTextArea1.setColumns(20);
103:                jTextArea1.setLineWrap(true);
104:                jTextArea1.setRows(10);
105:                jTextArea1.setWrapStyleWord(true);
106:                jTextArea1.setBounds(new Rectangle(8, 5, 208, 291));
107:                jScrollPane1.getViewport().setBackground(Color.pink);
108:                jScrollPane1.setBounds(new Rectangle(10, 8, 209, 152));
109:                this .add(jPanel1, null);
110:                jPanel1.add(jTextArea1, null);
111:                this .add(jPanel2, null);
112:                this .add(jPanel3, null);
113:                jPanel3.add(cancelBtn, null);
114:                jPanel3.add(okBtn, null);
115:                this .add(jLabel1, null);
116:                jPanel2.add(AreaText, null);
117:                jPanel2.add(jLabel4, null);
118:                jPanel2.add(jButton1, null);
119:                jPanel2.add(WidthEdit, null);
120:                jPanel2.add(HeightEdit, null);
121:                jPanel2.add(jLabel3, null);
122:                jPanel2.add(jLabel2, null);
123:                jPanel2.add(jScrollPane1, null);
124:            }
125:
126:            void jButton1_actionPerformed(ActionEvent e) {
127:                int width = Integer.parseInt(WidthEdit.getText());
128:                int height = Integer.parseInt(HeightEdit.getText());
129:
130:                AreaText.setText(Integer.toString(width * height));
131:            }
132:
133:            void cancelBtn_actionPerformed(ActionEvent e) {
134:                WidthEdit.setText("10");
135:                HeightEdit.setText("10");
136:            }
137:
138:            void okBtn_actionPerformed(ActionEvent e) {
139:                System.exit(0);
140:            }
141:
142:        }
143:
144:        class BoilerPlate_jButton1_actionAdapter implements 
145:                java.awt.event.ActionListener {
146:            BoilerPlate adaptee;
147:
148:            BoilerPlate_jButton1_actionAdapter(BoilerPlate adaptee) {
149:                this .adaptee = adaptee;
150:            }
151:
152:            public void actionPerformed(ActionEvent e) {
153:                adaptee.jButton1_actionPerformed(e);
154:            }
155:        }
156:
157:        class BoilerPlate_cancelBtn_actionAdapter implements 
158:                java.awt.event.ActionListener {
159:            BoilerPlate adaptee;
160:
161:            BoilerPlate_cancelBtn_actionAdapter(BoilerPlate adaptee) {
162:                this .adaptee = adaptee;
163:            }
164:
165:            public void actionPerformed(ActionEvent e) {
166:                adaptee.cancelBtn_actionPerformed(e);
167:            }
168:        }
169:
170:        class BoilerPlate_okBtn_actionAdapter implements 
171:                java.awt.event.ActionListener {
172:            BoilerPlate adaptee;
173:
174:            BoilerPlate_okBtn_actionAdapter(BoilerPlate adaptee) {
175:                this .adaptee = adaptee;
176:            }
177:
178:            public void actionPerformed(ActionEvent e) {
179:                adaptee.okBtn_actionPerformed(e);
180:            }
181:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.