im new to java but am getting better at it. My question today is for my two display lines how do i make them display on the same window instead of displaying sepretly?
import javax.swing.JOptionPane; public class gui{ public static void main(String[] args) { String name= JOptionPane.showInputDialog("What is your name?"); String names= JOptionPane.showInputDialog("What is your favorite color?"); String mes = String.format("Your name is %s", name); String mess = String.format("Your favorite color is %s", names); JOptionPane.showMessageDialog(null, mess); JOptionPane.showMessageDialog(null, mes); } }