We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, good afternoon,
import javax.swing.JOptionPane;
void setup(){
size(480,120);
background(0);
noLoop();
}
void draw(){
String a = JOptionPane.showInputDialog(null, "Hi", "Data", JOptionPane.QUESTION_MESSAGE); println(a);
}
I want that code to work on android.
I have this mistake: JOptionPane can not be resolved
What I can do?
Where do I can find the .jar file to include?
Regards and thanks in advance.
Answers
https://stackoverflow.com/questions/26558684/joptionpane-alternative-for-android
Hello GoToLoop,
Thanks for the information.
I've tried it that way, I managed to compile the app, but fails at startup and does not work.
I want to show a window where the user can enter text, to use that information. I can do with programming "lowest level" but the result is not so good. Do you have a piece of code that can help me?
a greeting
Sorry, I don't even have an Android! (%)
In Android, you have access neither to AWT nor to Swing (JOptionPane belongs to the latter), but you can access the native Android graphic components.
@anthony20== if you want an input from the user (not only the 3 buttons yes no cancel) like some txt you can try with an editText importing apwidgets library which can do that. code is simple: