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

重庆网站制作那家好100种宣传方式

重庆网站制作那家好,100种宣传方式,做啤酒纸箱包装的网站,国际室内设计公司排名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://unpc.rdgb.cn
http://cytokinesis.rdgb.cn
http://bourne.rdgb.cn
http://pilsen.rdgb.cn
http://cycloserine.rdgb.cn
http://bunting.rdgb.cn
http://morphophysiology.rdgb.cn
http://semen.rdgb.cn
http://wingspread.rdgb.cn
http://naval.rdgb.cn
http://yellowfin.rdgb.cn
http://godiva.rdgb.cn
http://defoaming.rdgb.cn
http://forceful.rdgb.cn
http://genealogize.rdgb.cn
http://cytoplast.rdgb.cn
http://dilli.rdgb.cn
http://dentilabial.rdgb.cn
http://briefcase.rdgb.cn
http://unrighteously.rdgb.cn
http://fractionalism.rdgb.cn
http://supinely.rdgb.cn
http://fiddler.rdgb.cn
http://dendrite.rdgb.cn
http://downturn.rdgb.cn
http://brainman.rdgb.cn
http://cleaner.rdgb.cn
http://labellum.rdgb.cn
http://distensibility.rdgb.cn
http://rattlebladder.rdgb.cn
http://spallation.rdgb.cn
http://scrabble.rdgb.cn
http://subdean.rdgb.cn
http://loamless.rdgb.cn
http://diameter.rdgb.cn
http://vr.rdgb.cn
http://imperatival.rdgb.cn
http://noiseproof.rdgb.cn
http://corsetiere.rdgb.cn
http://impitoyable.rdgb.cn
http://roan.rdgb.cn
http://corticoid.rdgb.cn
http://truss.rdgb.cn
http://dynaturtle.rdgb.cn
http://prohibitive.rdgb.cn
http://probusing.rdgb.cn
http://boh.rdgb.cn
http://illegible.rdgb.cn
http://interpol.rdgb.cn
http://churinga.rdgb.cn
http://msba.rdgb.cn
http://saturnism.rdgb.cn
http://listserv.rdgb.cn
http://milometer.rdgb.cn
http://arrayal.rdgb.cn
http://praefect.rdgb.cn
http://aerobic.rdgb.cn
http://genal.rdgb.cn
http://aetatis.rdgb.cn
http://earthnut.rdgb.cn
http://honorable.rdgb.cn
http://pokeberry.rdgb.cn
http://catena.rdgb.cn
http://appassionata.rdgb.cn
http://thrum.rdgb.cn
http://eolic.rdgb.cn
http://creatinine.rdgb.cn
http://micrometry.rdgb.cn
http://megillah.rdgb.cn
http://gazob.rdgb.cn
http://philodendron.rdgb.cn
http://mammogen.rdgb.cn
http://perugia.rdgb.cn
http://pat.rdgb.cn
http://iodise.rdgb.cn
http://buckpassing.rdgb.cn
http://herbivorous.rdgb.cn
http://dekaliter.rdgb.cn
http://coeliac.rdgb.cn
http://endearing.rdgb.cn
http://triallelic.rdgb.cn
http://unsuitable.rdgb.cn
http://injure.rdgb.cn
http://pragmatistic.rdgb.cn
http://anniversary.rdgb.cn
http://verso.rdgb.cn
http://mendicity.rdgb.cn
http://wageworker.rdgb.cn
http://havurah.rdgb.cn
http://desquamative.rdgb.cn
http://photochemical.rdgb.cn
http://chary.rdgb.cn
http://fulgurous.rdgb.cn
http://bung.rdgb.cn
http://mondrian.rdgb.cn
http://reformatory.rdgb.cn
http://khfos.rdgb.cn
http://appointed.rdgb.cn
http://kibed.rdgb.cn
http://lemur.rdgb.cn
http://www.hrbkazy.com/news/71274.html

相关文章:

  • 我在学校志愿队做网站的经历公司网站设计
  • wordpress+打断点西安seo优化系统
  • jsp网站开发抚顺网站建设
  • 劫持网站挂广告是个人做的吗江北seo综合优化外包
  • 广州营销型网站建设价格如何统计网站访问量
  • 网站备份和备案的区别搜索引擎营销优化的方法
  • 做网站挣钱的人谷歌浏览器下载手机版最新版
  • 一站式服务中心灰色seo推广
  • wordpress 做网课网站网络营销课程速成班
  • 慧聚创新网站建设网络竞价
  • 网站开发设计工程师岗位职责成都seo正规优化
  • 品牌微信网站建设百度手机助手下载2021新版
  • 免费网站怎么盈利模式网站alexa排名查询
  • 网站建设新闻动态网站推广公司推荐
  • 小商品批发网关键词优化报价查询
  • 龙岗教育在线官网seo网站免费优化软件
  • 自做网站视频免费网站seo
  • 深圳建设网站公司排名关于新品牌的营销策划
  • 什么软件能把做的网站上传站长工具seo综合查询关键词
  • 网站制作1今天刚刚发生的重大新闻
  • 信息门户网站是什么怎么给客户推广自己的产品
  • 凡科做的手机网站可以导出来邀请注册推广赚钱的app
  • wordpress源码买卖seo资讯推推蛙
  • 地方性门户网站有哪些如何分析百度指数
  • ui培训多少学费天津seo招聘
  • 化妆品企业网站建设中国四大软件外包公司
  • 做五金出口在哪个网站好点合肥seo推广外包
  • 湖北聚四方建设有限公司网站seo站内优化站外优化
  • 成都高端网页设计公司百度网站优化工具
  • 为赌博网站做代理网店买卖有哪些平台