Liu.H
Liu.H

Reputation: 15

How to change the text in showConfirmDialog without using array?

I am doing my assignment and one off it require a confirm dialog box to check if the people is single or married. But the question state the I'm not allowed to use array. I have search other answer but it all used array.

How to change the text in showConfirmDialog without using array?

Upvotes: 1

Views: 56

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168845

See JOptionPane.showConfirmDialog(parent,message). E.G.

int result = JOptionPane.showConfirmDialog(parent, "Are you married?"); 

Upvotes: 1

Related Questions