CS 106A Lecture Notes - Lecture 26: Init
Document Summary
Final exam: practice exams have been posted as well as study topics, study hard and know that your coding skills have improved over the past few weeks since the midterm! Borders: to set a border around any component, write: component. setborder( Borderfactory. createbordertype(params)): many different kinds of borders; see slides. Titledborder creates a title inside the text area. Jtextarea: a multi-line control for typing/ displaying text values, public jtextarea(int lines, int columns) Creates a new area, the given number of rows/ cols wide: public boolean iseditable, public void seteditable(boolean editable) Whether the user can change the text shown in the area: if you add a jtextarea (or anything else) to the center, the original settings are ignored and the entire center is made as that component. For wrapping around different lines: component. setwrapstyleword(boolean word); For wrapping around entire words instead of cutting words off. Jscrollpane midway: a container that adds scrollbars around any other component, public jscrollpane(component)