daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Jun 30th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. JList listTime = new JList();
  2.     listTime.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  3.     listTime.setFont(new Font("Times New Roman", Font.PLAIN, 25));
  4.     listTime.setBounds(329, 311, 200, 50);
  5.     frame.getContentPane().add(listTime);
  6.     try {
  7.         Class.forName("com.mysql.jdbc.Driver");
  8.         Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/suhel","root","Suhel786");
  9.         Statement stmt = con.createStatement();
  10.         String sql="select distinct time from tbmovie where movie='"+select_mov+"'";
  11.         ResultSet rs = stmt.executeQuery(sql);
  12.         while(rs.next())
  13.         {
  14.             listTime.add(rs.getString("time"));//here is the Error
  15.         }
  16.  
  17.     }
  18.     catch(Exception e1){
  19.         System.out.print(e1);
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand