Hi,
In JOptionPane, I want to show password label and its corresponding password textfiled in one line and then confirm password label and corresponding textfield in another line. Can anybody give me sample code for this ??
I am able to put the controllers in the JOptionPane one below the other. But not one after the other.
private ButtonGroup buttonGroup = new ButtonGroup();
private JRadioButton radioButton1 = new JRadioButton("Use default password");
private JRadioButton radioButton2 = new JRadioButton("I have changed the password");
private JLabel passwordLbl = new JLabel("Password:");
private JTextField passwordTF = new JTextField();
private Object[] pwdArray = {passwordLbl, passwordTF};
private
String difficultyString = "<html>Log in to the database failed.<br>Please select any of the following options below.</br></html>";
private Object[] radioButtonArray = {difficultyString, radioButton1, radioButton2, pwdArray};
JOptionPane.showConfirmDialog(this,
radioButtonArray, "Level selection",
JOptionPane.DEFAULT_OPTION,
JOptionPane.QUESTION_MESSAGE);
Please suggest me some way to achieve this.
Regards,
Satya