Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. // Create checkbox
  2. JCheckBox featuredCB = new JCheckBox();
  3. topPanel.add(featuredCB);
  4.  
  5. //Take the value of it and put it in featuredCheck value
  6. boolean featuredCheck = featuredCB.isSelected();
  7. System.out.println(featuredCheck);
  8.  
  9. submitBT.addActionListener(new ActionListener()
  10. {
  11. public void actionPerformed(ActionEvent event)
  12. {
  13. if(event.getSource() == submitBT)
  14. {
  15. idContent.setUser(userTF.getText());
  16. idContent.setMovie(titleTF.getText());
  17. idContent.setFeatured(featuredCheck);
  18. idContent.setRating(Integer.parseInt(ratingTF.getText()));
  19.  
  20.  
  21. if(owner.updateReview(isUpdate, idContent))
  22. {
  23. // success
  24. try {
  25. MovieReviewDSC.add(idContent);
  26. } catch (Exception e) {
  27. // TODO Auto-generated catch block
  28. e.printStackTrace();
  29. }
  30. }
  31. else
  32. {
  33. // fail
  34.  
  35. }
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement