JOption Msgbox title help?
Hey all
Just been working on this program for a couple of days now.. I recently started learning Java @ school, though my teacher cant give me a good answer on this issue:
Code:
package opg_c_uge34_valuta;
public class Main {
{
}
public static void main(String[] args) {
String valmsgtext = "Intast kursen du ønsker at regner med, eksempel: (578.35)";
String str1 = javax.swing.JOptionPane.showInputDialog(valmsgtext, "Skriv kurs her");
Double kur = Double.parseDouble(str1);
String Msgtext = "Indtast det antal kroner som skal omregnes.";
String str2 = javax.swing.JOptionPane.showInputDialog(Msgtext, "Skriv tal her");
Double svar = Double.parseDouble(str2);
Double result;
result = svar / kur * 100;
int ix = (int)(result * 100.0);
double result2 = ((double)ix)/100.0;
String res = "Dine " + svar + " kroner bliver i alt " + result2 + " Amerikanske Dollars:";
javax.swing.JOptionPane.showMessageDialog(null, res);
}
}
}
Dont mind the danish words, the code is what we are here for ;)
Anyway, what I want is to change the name of the MsgBox that will pop-up, "Input" isnt really a name I like in this case;)
Thanks in advance
- ZaabZ