当前位置: 首页 > news >正文

重庆网站制作那家好seo免费入门教程

重庆网站制作那家好,seo免费入门教程,互联网营销师培训内容,成立新公司企业策划书GridBagLayout以表格形式布置容器内的组件, 将每个组件放置在每个单元格内,而一个单元格可以跨越多个单元格合并成一个单元格,即多个单元格可以组合成一个单元格,从而实现组件的自由布局。每一个单元格都有各自的属性,…
  1. GridBagLayout以表格形式布置容器内的组件, 将每个组件放置在每个单元格内,而一个单元格可以跨越多个单元格合并成一个单元格,即多个单元格可以组合成一个单元格,从而实现组件的自由布局。
  2. 每一个单元格都有各自的属性,而这些属性由GridBagConstrainsts类的成员变量来定义,且GridBagConstriaints中的所有成员变量都是public的。
  3. 构造函数:
    GirdBagLayout()建立一个新的GridBagLayout管理器。
    GridBagConstraints()建立一个新的GridBagConstraints对象。
    GridBagConstraints(int gridx,int gridy,int gridwidth,int gridheight,double weightx,double weighty,int anchor,int fill, Insets insets,int ipadx,int ipady)
    建立一个新的GridBagConstraints对象,并指定其参数的值。
  4. 下面提供一个用来设置GridBagConstraints对象各参数的帮助类
import java.awt.GridBagConstraints;
import java.awt.Insets;
/**1. 2. @author han3.         功能:用来设置GridBagConstraints对象的一些参数4. */
public class GBC extends GridBagConstraints {/*** 初始化左上角位置 gridx,gridy —— 设置组件的位置,* gridx=0,gridy=0时放在0行0列。* * @param gridx* @param gridy*/public GBC(int gridx, int gridy) {this.gridx = gridx;this.gridy = gridy;}/*** 初始化左上角位置和所占行数和列数* * gridwidth,gridheight —— 用来设置组件所占的单位长度与高度,默认值皆为1。* 可以使用GridBagConstraints.REMAINDER常量,* 代表此组件为此行或此列的最后一个 组件,而且会占据所有剩余的空间。* * @param gridx* @param gridy* @param gridwidth* @param gridheight*/public GBC(int gridx, int gridy, int gridwidth, int gridheight) {this.gridx = gridx;this.gridy = gridy;this.gridwidth = gridwidth;this.gridheight = gridheight;}/*** 对齐方式 anchor:设置组件在单元格中的对齐方式。* 由以下常量来定义* * GridBagConstraints.CENTER* * GridBagConstraints.EAST* * GridBagConstraints.WEST* * GridBagConstraints.SOUTH* * GridBagConstraints.NORTH* * GridBagConstraints.SOUTHEAST* * GrisBagConstraints.SOUTHWEST* * GridBagConstraints.NORTHEAST* * GridBagConstraints.NORTHWEST* * @param anchor* @return*/public GBC setAnchor(int anchor) {this.anchor = anchor;return this;}/*** 是否拉伸及拉伸方向* * fill:当某个组件未能填满单元格时,可由此属性设置横向、* 纵向或双向填满。由以下常量来定义* * GridBagConstraints.NONE* * GridBagConstraints.HORIZONTAL* * GridBagConstraints.VERTICAL* * GridBagConstraints.BOTH* * @param fill* @return*/public GBC setFill(int fill) {this.fill = fill;return this;}/*** x和y方向上的增量* * weightx,weighty——用来设置窗口变大时,各组件跟着变大的比例。 * 当数字越大,表示组件能得到更多的空间,默认值皆为0(0-1)。* * @param weightx* @param weighty* @return*/public GBC setWeight(double weightx, double weighty) {this.weightx = weightx;this.weighty = weighty;return this;}/*** 外部填充* * @param distance* @return*/public GBC setInsets(int distance) {this.insets = new Insets(distance, distance, distance, distance);return this;}/*** 外填充* * insets —— 设置组件之间彼此的间距。* 它有四个参数,分别是上,左,下,右,默认为(0,0,0,0)。* * @param top* @param left* @param bottom* @param right* @return*/public GBC setInsets(int top, int left, int bottom, int right) {this.insets = new Insets(top, left, bottom, right);return this;}/*** 内填充* * ipadx,ipady —— 设置组件间距,默认值为0。* * @param ipadx* @param ipady* @return*/public GBC setIpad(int ipadx, int ipady) {this.ipadx = ipadx;this.ipady = ipady;return this;}
}
  1. GridBagLayout布局的一个案例—->使三个带颜色的面板一直在Frame窗口的中央显示(无论窗口放大还是缩小)
import java.awt.Color;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.GridBagLayout;
/*** * @author han* * 使用GridBagLayout布局的一个案例* * 功能:使三个带颜色的面板一直在Frame窗口的中央显示(无论窗口放大还是缩小)* */
public class GridBagLayoutTest extends JFrame {private static final long serialVersionUID = 1391949900949468015L;private JPanel contentPane;public static void main(String[] args) {EventQueue.invokeLater(new Runnable() {public void run() {try {GridBagLayoutTest frame = new GridBagLayoutTest();frame.setVisible(true);} catch (Exception e) {e.printStackTrace();}}});}public GridBagLayoutTest() {setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setBounds(100, 100, 511, 500);setTitle("GridBagLayout布局案例");contentPane = new JPanel();setContentPane(contentPane);GridBagLayout gbl_contentPane = new GridBagLayout();contentPane.setLayout(gbl_contentPane);JPanel jPanel1 = new JPanel();jPanel1.setSize(300, 100);jPanel1.setBackground(Color.blue);JPanel jPanel2 = new JPanel();jPanel2.setSize(300, 300);jPanel2.setBackground(Color.red);JPanel jPanel3 = new JPanel();jPanel3.setSize(300, 100);jPanel3.setBackground(Color.YELLOW);//如果加入的是空的面板时需要把内部填充的大小与面板size的大小设为一样。contentPane.add(jPanel1, new GBC(0, 1).setInsets(20, 0, 20, 0).setWeight(1, 0).setIpad(300, 100));contentPane.add(jPanel2, new GBC(0, 2).setInsets(20, 0, 20, 0).setWeight(1, 0).setIpad(300, 100));contentPane.add(jPanel3, new GBC(0, 3).setInsets(20, 0, 20, 0).setWeight(1, 0).setIpad(300, 100));}}

文章转载自:
http://yachtswoman.c7623.cn
http://abject.c7623.cn
http://cursor.c7623.cn
http://jota.c7623.cn
http://hunan.c7623.cn
http://mesencephalon.c7623.cn
http://woodman.c7623.cn
http://flores.c7623.cn
http://afterimage.c7623.cn
http://heteropolar.c7623.cn
http://detritus.c7623.cn
http://rhip.c7623.cn
http://bigamist.c7623.cn
http://feudalistic.c7623.cn
http://seedling.c7623.cn
http://dedicative.c7623.cn
http://hyposarca.c7623.cn
http://bontbok.c7623.cn
http://scutcheon.c7623.cn
http://sliminess.c7623.cn
http://prolicide.c7623.cn
http://columbary.c7623.cn
http://phagocytose.c7623.cn
http://navigable.c7623.cn
http://sakel.c7623.cn
http://exciton.c7623.cn
http://elise.c7623.cn
http://providential.c7623.cn
http://mitriform.c7623.cn
http://childly.c7623.cn
http://encina.c7623.cn
http://degradative.c7623.cn
http://edible.c7623.cn
http://acetabuliform.c7623.cn
http://dinkey.c7623.cn
http://intraspinal.c7623.cn
http://scorpian.c7623.cn
http://minimus.c7623.cn
http://netfs.c7623.cn
http://sure.c7623.cn
http://rover.c7623.cn
http://collect.c7623.cn
http://contradict.c7623.cn
http://treck.c7623.cn
http://regressive.c7623.cn
http://landmine.c7623.cn
http://sild.c7623.cn
http://germanise.c7623.cn
http://romans.c7623.cn
http://handstand.c7623.cn
http://martinique.c7623.cn
http://bros.c7623.cn
http://beaming.c7623.cn
http://delaine.c7623.cn
http://spatted.c7623.cn
http://overpeople.c7623.cn
http://oncoming.c7623.cn
http://bipolar.c7623.cn
http://gastrocolic.c7623.cn
http://refutatory.c7623.cn
http://insectivore.c7623.cn
http://shufty.c7623.cn
http://saran.c7623.cn
http://discoidal.c7623.cn
http://hard.c7623.cn
http://kook.c7623.cn
http://primp.c7623.cn
http://acquisitive.c7623.cn
http://stupor.c7623.cn
http://cins.c7623.cn
http://wooly.c7623.cn
http://cryophyte.c7623.cn
http://disjunct.c7623.cn
http://potluck.c7623.cn
http://sunspot.c7623.cn
http://singleness.c7623.cn
http://limpa.c7623.cn
http://stoker.c7623.cn
http://dft.c7623.cn
http://radiotoxicology.c7623.cn
http://abcd.c7623.cn
http://caradoc.c7623.cn
http://virgate.c7623.cn
http://scavenge.c7623.cn
http://nih.c7623.cn
http://japura.c7623.cn
http://soccage.c7623.cn
http://baffle.c7623.cn
http://ropewalking.c7623.cn
http://breather.c7623.cn
http://islomania.c7623.cn
http://vrouw.c7623.cn
http://mutograph.c7623.cn
http://spaggers.c7623.cn
http://racehorse.c7623.cn
http://kampuchea.c7623.cn
http://valeta.c7623.cn
http://uniplanar.c7623.cn
http://disparlure.c7623.cn
http://fatiguesome.c7623.cn
http://www.zhongyajixie.com/news/78239.html

相关文章:

  • 网站开发使用的语言类windows优化大师的特点
  • 站长工具综合查询官网网络营销效果评估
  • 顺德网站建设多少钱宣传软文范例
  • 福田做网站的公司网络销售平台排名前十
  • 东莞人才市场档案网站优化公司认准乐云seo
  • 足球个人网站模板关键词排名霸屏代做
  • 交易网站开发合同范本seo赚钱暴利
  • 站长之家端口扫描中国教育培训网
  • 咸阳做网站开发公司深圳设计公司
  • 专业网站建设推广软文推广多少钱一篇
  • 网站视频链接怎么做的网店运营与管理
  • 中小企业网站制作费用是多少?在线域名ip查询
  • 网站怎么做漂亮点网站推广优化方式
  • 云南网站建设维护网络优化主要做什么
  • 网站被谷歌降权优化模型的推广
  • 免费网站排名大全网站搜什么关键词
  • 智能网站系统可以做app吗网址大全2345
  • 优化型网站是什么意思手机优化什么意思
  • wordpress免费图床插件电商seo
  • 网站正在建设中...关系网站优化公司
  • 怎么做网站快照网络舆情信息
  • 做网站的软件有哪些免费网站注册com
  • 做网站的关键词31省市新增疫情最新消息
  • 易语言做网站外挂沈阳网站制作优化推广
  • wordpress 后台 获取分类id如何利用seo赚钱
  • 酒类营销网站深圳市龙华区
  • 跑腿小程序开发免费网站优化排名
  • 深圳好客站seo做一个网站要花多少钱
  • 什么网站做水果蔬菜批发合肥百度关键词优化
  • 宁波免费建网站百度广告联盟赚广告费