CODE GIVEN: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JCapitals extends JFrame implements ItemListener { FlowLayout
Fantastic news! We've Found the answer you've been seeking!
Question:
CODE GIVEN:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JCapitals extends JFrame implements ItemListener {
FlowLayout flow = new FlowLayout();
JLabel countryLabel = new JLabel("Select a country");
JComboBox countryBox = new JComboBox();
JTextField capitalField = new JTextField(25);
// your code here
public JCapitals() {
// Write your code here
}
public static void main(String[] arguments) {
JCapitals cframe = new JCapitals();
cframe.setSize(400, 150);
cframe.setVisible(true);
}
@Override
public void itemStateChanged(ItemEvent list) {
// Write your code here
}
}
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date: