String array for Choice, JOptionPane doesn't show
1.Is there a way that you can make the choicelist use a string array, the thing is that I want the contents of the choice list to change to suite what is selected in my checkboxes, I find the lengthy addItem awkward and hard to replace in this case.
2.I also wanted to show a message dialog, I imported the necessary class import javax.swing.JOptionPane;
but when i used it in my code it gave an error
JOptionPane.showMessageDialog(null, "You have not selected details of what you want to know!", JOptionPane.WARNING_MESSAGE);
How do you show the message dialog?
I had tried the myParentComponent() which is MyRequest
I Will try the loop,
but for the JOptionPane I had tried that i.e myParentComponent(), Actually the name of the applet is MyRequest so I had
but it still didn't work!
JOptionPane.showMessageDialog(MyRequest, "You have not selected details of what you want to know!", JOptionPane.WARNING_MESSAGE);