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.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.