sintassi
JOptionPane.showInputDialog(this, "testo", "intestazione", JOptionPane.PLAIN_MESSAGE));
esempio: setta testo del campotesto da richiesta input
campotesto.setText(JOptionPane.showInputDialog(this, "Inserisci un testo", "Richiesta input", JOptionPane.PLAIN_MESSAGE));