Input fields joptionpane quilting two showinputdialog

Yes. Most Dialogs present an error message or warning to a user, but Dialogs can present images, directory trees, or just about anything compatible with the main Swing Application that manages them.For convenience, several Swing component classes can directly instantiate and display dialogs. To create simple, standard dialogs, you use theJOptionPane class.

The ProgressMonitor class can put up a dialog that shows the progress of an operation. Two other classes, JColorChooser and JFileChooser, also supply standard joptionpane showinputdialog two input fields quilting. To bring up a print dialog, you can use thePrinting API. To create a custom dialog, use theJDialog class directly.The code for simple dialogs can be minimal. For example, here is an informational dialog:Here is the code that creates and shows it. JOptionPaAttention, Internet Explorer UserAnnouncement: Oracle Community has discontinued support for Internet Explorer 7 and below.In order to provide the best platform for continued innovation, Oracle Community no longer supports Internet Explorer 7.Oracle Community will not function with this version of Internet Explorer.

I need a JOptionPane.showInputDialog box has multiple input fields, with a question before each field. I can only figure out how to do one per JOptionPane. BeI am pretty sure the answer to my question will be NO, but I will ask anyway.For a homework assignment in my Into to Java Class I have to write a simple program that will take user input in the for of a string for gallons and miles driven and compute the MPG.

I have the program doing what I need it to for the assignment, but I would like to go a small step further. I do not like the fact that it is using two dialog boxes to input the two numbers.

Joptionpane showinputdialog two input fields quilting

Input fields joptionpane quilting two showinputdialog