Playing with Swing Components

Descrição

Computer Programming (Java) FlashCards sobre Playing with Swing Components, criado por desnunan em 29-03-2014.
desnunan
FlashCards por desnunan, atualizado more than 1 year ago
desnunan
Criado por desnunan mais de 10 anos atrás
35
0

Resumo de Recurso

Questão Responda
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);

Semelhante

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