Playing with Swing Components

Descripción

(Java) Computer Programming Fichas sobre Playing with Swing Components, creado por desnunan el 29/03/2014.
desnunan
Fichas por desnunan, actualizado hace más de 1 año
desnunan
Creado por desnunan hace alrededor de 10 años
34
0

Resumen del Recurso

Pregunta Respuesta
What is the syntax for making a JTextField? JTextField field = new JTextField(nColumns); JTextField field = new JTextField("your name");
What is the syntax for making a JTextArea? JTextArea text = new JTextArea(lines, columns);
What is the syntax for making a JCheckBox? JCheckBox check = new JCheckBox("Goes to 11");
What is the syntax for making a JList? JList list = new JList(listEntries);
What is the syntax to register for a JCheckBox item event? check.addItemListener(this);
What is the syntax to select or deselect a JCheckBox? check.setSelected(true); check.setSelected(false);
What syntax to use to restrict the user to selecting only ONE thing at a time in JList? list.setSelectionMode (ListSelectionModel. SINGLE_SELECTION);
What is the syntax to register for a JList list selection event? list.addListSelectionListener(this);
What is the method for handling a JCheckBox item event? public void itemStateChanged(ItemEvent ev) {..}
What is the method for handling a JList list selection event? public void valueChanged(ListSelectionEvent lse) {..}
What is the syntax for turning on line wrapping for a JTextArea object? text.setLineWrap(true);
Mostrar resumen completo Ocultar resumen completo

Similar

Java Week 5 Object Oriented Programming
Troy Bowlin
Making a GUI
desnunan
Java Practice 1
Ummm No
PEGA CSSA Prep
Wendell Phipps
Getting a User Event
desnunan
Listener
desnunan
Paintable Widgets
desnunan
Handling Swing Component Events
desnunan
Make a JScrollPane
desnunan
Java Practice 2
Ummm No
Servion - Java Questionnaire
rohit.benedict