I was wondering how to add a JLabel
to the bottom right corner of this JFrame
? I am also fairly new to coding so I will be taking this as a learning experience.:)
public class MainQuestions {
public static void main (String args[]){
JFrame frame=new JFrame();
Object ARRAY[]={"French","English","Portugese","Spanish"};
String answer=(String)JOptionPane.showInputDialog(frame, "What language predominately spoken in Latin American countries?","World Geography Review", JOptionPane.PLAIN_MESSAGE, null, ARRAY, null);
if(answer == null) {
//System.exit(0);
} else if(answer.equals("Spanish")) {
JOptionPane.showMessageDialog(null, "Correct!", "World Geography Review", JOptionPane.PLAIN_MESSAGE,null);
//System.exit(0);
} else {
JOptionPane.showMessageDialog(null, "Sorry, wrong answer.", "World Geography Review", JOptionPane.PLAIN_MESSAGE,null);
//System.exit(0);
}
}
}