Swing
tiantangqiu
这个作者很懒,什么都没留下…
展开
-
Swing 学习网址
Java Swing 官网带了很多例子和使用方式 How to use: http://docs.oracle.com/javase/6/docs/api/原创 2014-07-21 15:01:17 · 344 阅读 · 0 评论 -
Swing Jtable 选择与反选
Swing 中设置jtable 行取消和选中常用如下: [code="java"] //选中N-M行 table.setRowSelectionInterval(0, 0);//选中索引未0行 table..setRowSelectionInterval(0, 1);//选中索引0-1行 //追加选中 table.addRowSelectionInterval(1, 1);...2015-04-02 09:46:31 · 409 阅读 · 0 评论 -
SWING - TableLayout
官网: http://www.clearthought.info/sun/products/jfc/tsc/articles/tablelayout/TableLayoutConstraints.html 开源JAR 下载及例子参考官网右侧导航栏 属性参数: [img]http://dl2.iteye.com/upload/attachment/0101/5875/22aa26...原创 2014-09-23 10:26:22 · 232 阅读 · 0 评论 -
Swingx
官网地址:https://swingx.java.net/ 可以点击 Laxxx 通过Webstart运行看到效果跟源代码 下载地址:https://java.net/downloads/swingx/releases/weekly/ swingx :http://download.java.net/javadesktop/ (包含swingset3下载) api网址资源:...原创 2014-09-29 11:44:07 · 897 阅读 · 0 评论 -
JPanel重写背景图片
JPanel mainPanel = new JPanel(){ private static final long serialVersionUID = 1L; public void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(Im...2014-10-10 15:08:47 · 297 阅读 · 0 评论 -
Jframe居中
方法一: JFrame frame = new JFrame("TEST"); frame.setSize(200,100) Toolkit toolkit = Toolkit.getDefaultToolkit(); int x = (int)(toolkit.getScreenSize().getWidth()-f.getWidth())/2; int y = (int)(toolki...原创 2016-06-06 15:35:55 · 112 阅读 · 0 评论 -
java swing带复选框的JList控件
最近需要一个带复选框的JList控件, 网上找了下相关例子,进行下改造,记录一下。 MainFrame 运行类 [img]http://dl2.iteye.com/upload/attachment/0120/2702/9984335f-c727-3f9a-932d-67b40cadf57a.png[/img] ...2016-09-27 16:51:37 · 772 阅读 · 0 评论 -
swing jtable设置列宽
for (int j = 0; j < componentTable.getColumnCount(); j++) { componentTable.getColumnModel().getColumn(j).setPreferredWidth(130); }原创 2014-11-10 17:43:49 · 958 阅读 · 0 评论 -
swing-FlowLayout垂直布局
[code="java"] package layout; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Insets; import javax.swing.JButton...原创 2016-12-07 17:35:24 · 3352 阅读 · 0 评论