CSCI 1302 test 4

  1. Things we can do with subclasses of Labeled
    With buttons, labels, check box etc. we can create them with an image. So new Button(“Text”, “/imagepath”)
  2. Things we can do with subclasses of buttonbase
    On action lambda expressions. (Check box, radio button, button)
  3. Using radio button vs check box
    Cannot choose more than one radio button at a time. Must create a new toggle group for each set
  4. How to enter multiple lines of text
    TextArea object
  5. How to assign toggle group to each radioButton
  6. Control subclasses
    Labeled, scrollbar, slider, textInputControl, ListView, ComboBoxBase
  7. Why can’t you setOnAction with TextInputControl subclasses
    Because it is not a subclass of ButtonBase
  8. Subclasses of control
    Labeled(ButtonBase), ScrollBar, Slider, TextInputControl, ListView, ComboBoxBase
  9. How does javafx handle video and audio
  10. What can be done with audio and video
  11. How to populate ComboBox
    • ObserveableList items =
    • FXCollections.observableArrayList(“Item 1”, “Item 2”, “Item 3”);
    • THEN......
    • ComboBox cmb1 = new ComboBox<>(items);
  12. How to switch from single choice or multiple choice in a ListView
  13. Difference between text and binary files
    Binary files are meant for computer to read. Both use try with, both need outside objects to read/write
  14. Advantage between text and binary files
    Binary more efficient to process. Text files have to be encoded and decided where as binary files do not require conversions
  15. How to do input/output with integers in binary files?
    • FileOutputStream output, output.write(“”);
    • FileInputStream input,“”);
  16. How to write primitives other than int to binary file
    By creating a Data Input/Output Stream object with a FileInputStream object in the constructor
  17. Why and how to use buffered streams
    Buffered streams write/read data much faster. input = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
Card Set
CSCI 1302 test 4