this is my text input but i would like it to show on greenfoot world
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import javax.swing.JOptionPane;
/**
* Write a description of class Text here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Text extends Actor
{
/**
* Act - do whatever the Text wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if (Greenfoot.mousePressed(this)) {
String inputValue = JOptionPane.showInputDialog("Please input a sentence");
}
}
}