Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JList listTime = new JList();
- listTime.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- listTime.setFont(new Font("Times New Roman", Font.PLAIN, 25));
- listTime.setBounds(329, 311, 200, 50);
- frame.getContentPane().add(listTime);
- try {
- Class.forName("com.mysql.jdbc.Driver");
- Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/suhel","root","Suhel786");
- Statement stmt = con.createStatement();
- String sql="select distinct time from tbmovie where movie='"+select_mov+"'";
- ResultSet rs = stmt.executeQuery(sql);
- while(rs.next())
- {
- listTime.add(rs.getString("time"));//here is the Error
- }
- }
- catch(Exception e1){
- System.out.print(e1);
- }
Add Comment
Please, Sign In to add comment