JLable水平滚动条问题,急~~在线等

来源:百度知道 编辑:UC知道 时间:2024/05/08 22:53:53
水平滚动条为什么显示不了,附上部分代码

private JTabbedPane createNavigationPanel() { // 创建导航标签面板的方法
JTabbedPane tabbedPane = new JTabbedPane();

JPanel databasePanel=new JPanel();//人员档案总览
tabbedPane.addTab("人员档案查询",databasePanel);
JLabel label=new JLabel("选择查询条件:");
String[] comboboxtitle1={"姓名","性别","出生日期","籍贯","家庭住址"};
String[] comboboxtitle2={"等于","包含"};
JComboBox conditionBox1=new JComboBox();
conditionBox1.setModel(new DefaultComboBoxModel(comboboxtitle1));
JComboBox conditionBox2=new JComboBox();
conditionBox2.setModel(new DefaultComboBoxModel(comboboxtitle2));
JTextField textfield=new JTextField(10);
JButton buttonSelect=new JButton("查询");
JButton buttonShowAll=new JButton("显示全部数据");
databasePanel.add(label,BorderLayout.NORTH);
databasePanel.add(conditionBox1,BorderLa

JScrollPane sDatabaseTable=new JScrollPane(databaseTable);//添加滚动条
databasePanel.add(sDatabaseTable,BorderLayout.CENTER);

感觉没什么问题··要不你把全码发到我邮箱上来 mr87@vip.qq.com 我仔细看看