本文整理汇总了Java中javax.swing.JScrollPane.setAutoscrolls方法的典型用法代码示例。如果您正苦于以下问题:Java JScrollPane.setAutoscrolls方法的具体用法?Java JScrollPane.setAutoscrolls怎么用?Java JScrollPane.setAutoscrolls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JScrollPane
的用法示例。
在下文中一共展示了JScrollPane.setAutoscrolls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: KeHuChaXun
import javax.swing.JScrollPane; //导入方法依赖的package包/类
public KeHuChaXun() {
super();
setIconifiable(true);
setClosable(true);
setTitle("�ͻ���Ϣ��ѯ");
getContentPane().setLayout(new GridBagLayout());
setBounds(100, 100, 640, 375);
table = new JTable();
table.setEnabled(false);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
String[] tableHeads = new String[]{"�ͻ�ID", "�ͻ�ȫ��", "�ͻ���ַ", "�ͻ����",
"��������", "�硡����", "��������", "�� ϵ ��", "��ϵ�绰", "E-Mail", "��������",
"�����˺�"};
final DefaultTableModel dftm = (DefaultTableModel) table.getModel();
dftm.setColumnIdentifiers(tableHeads);
final JScrollPane scrollPane = new JScrollPane(table);
scrollPane.setAutoscrolls(true);
final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
gridBagConstraints_6.weighty = 1.0;
gridBagConstraints_6.insets = new Insets(0, 10, 5, 10);
gridBagConstraints_6.fill = GridBagConstraints.BOTH;
gridBagConstraints_6.gridwidth = 6;
gridBagConstraints_6.gridy = 1;
gridBagConstraints_6.gridx = 0;
getContentPane().add(scrollPane, gridBagConstraints_6);
setupComponet(new JLabel(" ѡ���ѯ������"), 0, 0, 1, 1, false);
conditionBox1 = new JComboBox();
conditionBox1.setModel(new DefaultComboBoxModel(new String[]{"�ͻ�ȫ��",
"�ͻ����"}));
setupComponet(conditionBox1, 1, 0, 1, 30, true);
conditionBox2 = new JComboBox();
conditionBox2.setModel(new DefaultComboBoxModel(
new String[]{"����", "����"}));
setupComponet(conditionBox2, 2, 0, 1, 30, true);
conditionContent = new JTextField();
setupComponet(conditionContent, 3, 0, 1, 140, true);
final JButton queryButton = new JButton();
queryButton.addActionListener(new queryAction(dftm));
queryButton.setText("��ѯ");
setupComponet(queryButton, 4, 0, 1, 1, false);
showAllButton = new JButton();
showAllButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
conditionContent.setText("");
List list = Dao.getKhInfos();
updateTable(list, dftm);
}
});
setupComponet(showAllButton, 5, 0, 1, 1, false);
showAllButton.setText("��ʾȫ������");
}