Beispiel #1
0
 @Override
 public void mouseClicked(MouseEvent e) {
   // TODO Auto-generated method stub
   if (e.getSource() == table) {
     if (e.getClickCount() == 2) // 더블클릭
     {
       int row = table.getSelectedRow();
       String no = model.getValueAt(row, 0).toString();
       bp.setPoster(Integer.parseInt(no));
       bp.repaint();
       Book book = bm.bookDetail(Integer.parseInt(no));
       la1.setText("번호:" + no);
       la2.setText("제목:" + book.getTitle());
       la3.setText("저자:" + book.getAuthor());
       la4.setText("출판사:" + book.getPublisher());
       la5.setText("가격:" + book.getPrice());
     }
   } else if (e.getSource() == b) {
     getData();
   }
 }