Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

private static void newTicketMaker() { String[] items = {\"Low\", \"Medium\", \"

ID: 3830099 • Letter: P

Question

private static void newTicketMaker() {

String[] items = {"Low", "Medium", "High", "URGENT"};

JComboBox combo = new JComboBox(items);

JTextField field2 = new JTextField(120);

JPanel panel = new JPanel(new GridLayout(10,50 ));

panel.add(new JLabel("Priority: "));

panel.add(combo);

panel.add(new JLabel("Description:"));

  

  

panel.add(field2);

int result = JOptionPane.showConfirmDialog(null, panel, "Submit a Ticket",

JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

  

Description: Submit a Ticket Cancel OK,

Explanation / Answer

Use JTextArea instead of JTextField. You can configure the width and height of the textbox.