问题描述
import net.proteanit.sql.dbutils;
import library.dao; //conn class
public class BookDetails extends JFrame implements ActionListener {
private JPanel contentPane;
private JTable table;
private JTextField search;
private JButton b1,b2,b3;
public BookDetails() {
super("Book Details");
setBounds(350,200,890,475);
contentPane = new JPanel();
contentPane.setBackground(Color.WHITE);
contentPane.setBorder(new EmptyBorder(5,5,5));
setContentPane(contentPane);
contentPane.setLayout(null);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(79,133,771,282);
contentPane.add(scrollPane);
table = new JTable();
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent arg0) {
int row = table.getSelectedRow();
search.setText(table.getModel().getValueAt(row,1).toString());
}
});
table.setForeground(Color.DARK_GRAY);
table.setBackground(new Color(240,248,255));
table.setFont(new Font("Trabichet MS",Font.BOLD,16));
scrollPane.setViewportView(table);
book();
}
这里我只是在摆桌子
public void book() {
try {
conn con = new conn();
String query = "SELECT * FROM book";
PreparedStatement st = con.c.prepareStatement(query);
ResultSet rs = st.executeQuery();
table.setModel(dbutils.resultSetToTableModel(rs));
rs.close();
st.close();
con.c.close();
} catch (Exception e) {
e.printstacktrace();
}
}
这是我使用 rs2xml JAR 导入数据的地方。
我面临的错误是: 启动层初始化时出错 java.lang.module.FindException:无法为 C:\Users\shlok\Downloads\rs2xml.jar 派生模块描述符 引起:java.lang.module.InvalidModuleDescriptorException: JDOMAbout$Author.class found in top-level directory (unnamed package not allowed in module)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)