JAVA开发环境的搭建―――JDK+TOMCAT+eclipse
2013-07-25 17:10
691 查看
<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog01.html" frameborder="0" width="728" scrolling="no" height="90"></iframe>
Netbeans FormDesigner的确非常的强大。我现在的一个Swing项目采取的开发方法是,使用netbeans的form designer设计界面。当然设计出来的界面只包含组件的定义。也就相当于MVC的View,所有控制类放到一个Controller里面。
要快速上手Form Desinger的方法就是要学会看懂它的.form文件。这个文件是xml格式的,因此非常容易懂。
一般的格式都是这样的,先定义布局。例如GridLayout ,2行1列
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="1"></property><br><property name="horizontalGap" type="int" value="5"></property><br><property name="rows" type="int" value="2"></property><br><property name="verticalGap" type="int" value="5"></property><br></layout>
包含两个用于布局的panel
<subcomponents><br><container class="javax.swing.JPanel" name="aliasPnl"></container></subcomponents>
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="2"></property><br><property name="rows" type="int" value="1"></property><br></layout>
<subcomponents></subcomponents>
存放一个登陆用的下拉框
<component class="javax.swing.JLabel" name="loginAliasesLbl"><br><properties><br><property name="horizontalAlignment" type="int" value="0"></property><br><property name="text" type="java.lang.String" value="Choose Alias"></property><br></properties><br></component>
<component class="javax.swing.JComboBox" name="loginAliasesCbo"><br></component>
<container class="javax.swing.JPanel" name="buttonPnl"></container>
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="3"></property><br><property name="horizontalGap" type="int" value="5"></property><br><property name="rows" type="int" value="1"></property><br><property name="verticalGap" type="int" value="5"></property><br></layout>
三个按钮并排放
<subcomponents><br><component class="javax.swing.JButton" name="manageBtn"><br><properties><br><property name="mnemonic" type="int" value="109"></property><br><property name="text" type="java.lang.String" value="Manage a/cs"></property><br></properties><br></component><br><component class="javax.swing.JButton" name="loginBtn"><br><properties><br><property name="mnemonic" type="int" value="108"></property><br><property name="text" type="java.lang.String" value="Login"></property><br></properties><br></component><br><component class="javax.swing.JButton" name="cancelBtn"><br><properties><br><property name="mnemonic" type="int" value="99"></property><br><property name="text" type="java.lang.String" value="Cancel"></property><br></properties><br></component><br></subcomponents>
把这个文件摸透以后,在来使用GUI就直观多了,按照左下角的导航栏来设计模块的包含非常的简单。
这个世界上的GUI IDE有两种逻辑,一种是把事情做好。不管花什么代价。另一种是代价要最小,不管东西好不好,能用就行。
Swing是前者。VB是后者
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=480532
Netbeans FormDesigner的确非常的强大。我现在的一个Swing项目采取的开发方法是,使用netbeans的form designer设计界面。当然设计出来的界面只包含组件的定义。也就相当于MVC的View,所有控制类放到一个Controller里面。
要快速上手Form Desinger的方法就是要学会看懂它的.form文件。这个文件是xml格式的,因此非常容易懂。
一般的格式都是这样的,先定义布局。例如GridLayout ,2行1列
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="1"></property><br><property name="horizontalGap" type="int" value="5"></property><br><property name="rows" type="int" value="2"></property><br><property name="verticalGap" type="int" value="5"></property><br></layout>
包含两个用于布局的panel
<subcomponents><br><container class="javax.swing.JPanel" name="aliasPnl"></container></subcomponents>
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="2"></property><br><property name="rows" type="int" value="1"></property><br></layout>
<subcomponents></subcomponents>
存放一个登陆用的下拉框
<component class="javax.swing.JLabel" name="loginAliasesLbl"><br><properties><br><property name="horizontalAlignment" type="int" value="0"></property><br><property name="text" type="java.lang.String" value="Choose Alias"></property><br></properties><br></component>
<component class="javax.swing.JComboBox" name="loginAliasesCbo"><br></component>
<container class="javax.swing.JPanel" name="buttonPnl"></container>
<layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout"><br><property name="columns" type="int" value="3"></property><br><property name="horizontalGap" type="int" value="5"></property><br><property name="rows" type="int" value="1"></property><br><property name="verticalGap" type="int" value="5"></property><br></layout>
三个按钮并排放
<subcomponents><br><component class="javax.swing.JButton" name="manageBtn"><br><properties><br><property name="mnemonic" type="int" value="109"></property><br><property name="text" type="java.lang.String" value="Manage a/cs"></property><br></properties><br></component><br><component class="javax.swing.JButton" name="loginBtn"><br><properties><br><property name="mnemonic" type="int" value="108"></property><br><property name="text" type="java.lang.String" value="Login"></property><br></properties><br></component><br><component class="javax.swing.JButton" name="cancelBtn"><br><properties><br><property name="mnemonic" type="int" value="99"></property><br><property name="text" type="java.lang.String" value="Cancel"></property><br></properties><br></component><br></subcomponents>
把这个文件摸透以后,在来使用GUI就直观多了,按照左下角的导航栏来设计模块的包含非常的简单。
这个世界上的GUI IDE有两种逻辑,一种是把事情做好。不管花什么代价。另一种是代价要最小,不管东西好不好,能用就行。
Swing是前者。VB是后者
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=480532
相关文章推荐
- Java 学习笔记 开发环境搭建JDK+Tomcat+Eclipse
- JDK+Eclipse+Mysql+Tomcat搭建Java学习开发环境
- Java 学习笔记 开发环境搭建JDK+Tomcat+Eclipse
- Linux下JAVA开发环境的搭建(JDK+Eclipse+Tomcat详细)
- Java Web开发环境搭建(jdk+eclipse+tomcat+maven+mysql)
- 裸机搭建java开发环境(windows+jdk+eclipse+maven+git+tomcat)
- javaweb开发环境搭建JDK+Tomcat+Eclipse
- 腾讯云Ubuntu16.04下搭建Java开发环境(工具,JDK,Eclipse,MySQL,Tomcat)
- java开发环境搭建,jdk,eclipse,git,gradle,ssh,tomcat,mysql,navicat mysql,maven,svn环境搭建
- java开发环境搭建jdk+tomcat+eclipse
- 暑期打卡——Ubuntu下的java web开发环境搭建(eclipse+tomcat+mysql+jdk)
- Eclipse下Java 开发环境搭建(JDK+Maven+Subversion+Tomcat)
- JAVA开发环境的搭建———JDK+TOMCAT+eclipse
- Java 学习笔记 开发环境搭建JDK+Tomcat+Eclipse
- Eclipse 4.2 + Tomcat 7.x + JDK 7 搭建Java Web开发环境
- java web开发环境搭建(jdk+Tomcat+Eclipse)(Eclipse食用方法)
- J2EE开发环境搭建(1)——安装JDK、Tomcat、Eclipse
- JAVA开发环境搭建(jdk7,ant,tomcat)
- Linux服务器搭建Java开发环境(jdk+mysql+tomcat+maven)
- 搭建JAVA开发环境--JDK1.6--eclipse--myeclipse