How can I make a JFrame modal like a JOptionPane?
问题 First, I will make the question and then I will explain the application. How can I make JFrame s to behave like JOptionPanes ? (tutorial didn't help) i.e. [Show content >> return a value] . Aditionally I need it to be [Show the frame >> Ask information >> Modify an object passed as parameter to the constructor >> return something] I already made the "Ok" button get the answer i want (displaying it in the console), but i cant figure out where to put the return statement i want the function to