本文整理了Java中javax.swing.JTable.setBounds()
方法的一些代码示例,展示了JTable.setBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.setBounds()
方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:setBounds
暂无
代码示例来源:origin: winder/Universal-G-Code-Sender
@Override
public void setBounds(int x, int y, int width, int height)
{
super.setBounds(x, y, width, height);
// This is totally bogus, but they look alright when I throw in a max
// width for the boolean columns.
setPreferredColumnWidths(new double[] {0.25, 0.3, 0.2, 0.2, 0.2} );
getColumnModel().getColumn(COL_INDEX_SENT).setResizable(false);
getColumnModel().getColumn(COL_INDEX_SENT).setMaxWidth(50);
getColumnModel().getColumn(COL_INDEX_DONE).setResizable(false);
getColumnModel().getColumn(COL_INDEX_DONE).setMaxWidth(50);
}
代码示例来源:origin: stackoverflow.com
JTable table = new JTable(tableModel);
table.setBounds(0, 65, 432, 188);
contentPane.add(table_2);
代码示例来源:origin: stackoverflow.com
JTable jt=new JTable(rowsArray,columnNames);
jt.setBounds(30,40,200,300); // you can put dimension as per your wish...
JScrollPane sp=new JScrollPane(jt);
jPanel2.add(sp);
// code fore set visible true to jpanel2...
代码示例来源:origin: stackoverflow.com
DefaultTableModel table_model = new DefaultTableModel(addressData, new String[]{"First Name", "Surname", "Home Number", "Mobile Number", "Address", "Postcode"});
JTable table = new JTable(this.table_model);
table.setBounds(130, 40, 200, 200);
jp.add(new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS));
代码示例来源:origin: stackoverflow.com
JPanel panel = new JPanel();
this.setContentPane(panel);
panel.setLayout(null);
String data[][] = {{"1.", "ABC"}, {"2.", "DEF"}, {"3.", "GHI" }};
String col[] = {"Sr. No", "Name"};
JTable table = new JTable(data,col);
table.setBounds(100, 100, 100, 80);
panel.add(table);
setVisible(true);
setSize(300,300);
代码示例来源:origin: stackoverflow.com
int headerHeight = table.getTableHeader().getPreferredSize().height;
table.getTableHeader().setBounds(0, 0, width, headerHeight);
table.setBounds(0, headerHeight, width, height - headerHeight);
代码示例来源:origin: de.sciss/jtreetable
protected void layoutTable() {
table.setBounds(0, 0, treeTable.getWidth(), treeTable.getHeight());
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
/** Try to revalidate once again because we want table to have
* width that it asked for.
*/
public void setBounds(int x, int y, int width, int height) {
super.setBounds(x, y, width, height);
if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) {
return;
}
if (trytorevalidate && width != getPreferredScrollableViewportSize().width) {
trytorevalidate = false;
compoundScrollPane.validate();
trytorevalidate = true;
}
}
代码示例来源:origin: stackoverflow.com
dataTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
dataTable.setFillsViewportHeight(true);
dataTable.setBounds(220, 130, 300, 200);
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/** Try to revalidate once again because we want table to have
* width that it asked for.
*/
public void setBounds(int x, int y, int width, int height) {
super.setBounds(x, y, width, height);
if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) {
return;
}
if (trytorevalidate && (width != getPreferredScrollableViewportSize().width)) {
trytorevalidate = false;
compoundScrollPane.validate();
trytorevalidate = true;
}
}
代码示例来源:origin: org.apache.directory.server/apacheds-xdbm-tools
m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
m_attrScrollPnl.getViewport().add( m_attrTbl );
m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
m_attrTbl.setEditingColumn( 1 );
m_attrTbl.setCellSelectionEnabled( true );
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
/** Try to revalidate once again because we want table to have
* width that it asked for.
*/
public void setBounds(int x, int y, int width, int height) {
super.setBounds(x, y, width, height);
if (this.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF) {
return;
}
if (trytorevalidate && width != getPreferredScrollableViewportSize().width) {
trytorevalidate = false;
compoundScrollPane.validate();
trytorevalidate = true;
}
}
代码示例来源:origin: org.apache.directory/com.springsource.org.apache.directory.server.core
m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
m_attrScrollPnl.getViewport().add( m_attrTbl );
m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
m_attrTbl.setEditingColumn( 1 );
m_attrTbl.setCellSelectionEnabled( true );
代码示例来源:origin: org.apache.directory/com.springsource.org.apache.directory.server.core
m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
m_attrScrollPnl.getViewport().add( m_attrTbl );
m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
m_attrTbl.setCellSelectionEnabled( true );
代码示例来源:origin: org.apache.directory.server/apacheds-xdbm-tools
m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
m_attrScrollPnl.getViewport().add( m_attrTbl );
m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
m_attrTbl.setCellSelectionEnabled( true );
代码示例来源:origin: robward-scisys/sldeditor
filterTable.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
filterTable.setBounds(xPos, 0, BasePanel.FIELD_PANEL_WIDTH, getRowY(maxNoOfRows - 2));
filterTable
.getSelectionModel()
代码示例来源:origin: robward-scisys/sldeditor
extentTable.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
extentTable.setBounds(
xPos, getRowY(startRows + 1), BasePanel.FIELD_PANEL_WIDTH, getRowY(noOfRows - 2));
extentTable
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
spParent.add(SearchableDemo.createTitledPanel("searchable", 'S', sp));
table.setBounds(25, 50, 950, 600);
table.setRowHeight((int) colmin.getHeight());
table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
代码示例来源:origin: stackoverflow.com
table1.setBounds(0, yOffset + headerHeight, (int) Math.floor(pageWidth), (int) Math.floor(tableHeight));
代码示例来源:origin: robward-scisys/sldeditor
table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
table.setBounds(
xPos,
getRowY(maxNoOfConfigRows),
内容来源于网络,如有侵权,请联系作者删除!