简体   繁体   中英

Java JOptionPane returning method from another class

I have a method in a class that creates a summary or report of information for all of the nurses of a system. The method shows all of the trainee nurses that belong to nurses. I have created another class that creates a JFrame and JOptionPane for the user to input information. I am trying to make the JOptionPane return the summary for just one particular nurse and the trainee nurses that they are in charge of, once the name is inputted into the JOptionPane . I can't provide any code but any help would be great

当您调用JOptionPane时,应用程序将等待用户提供输入,因为它是一个模态对话框-听起来好像您想使用showInputDialog方法来取回所请求的护士-然后您的应用程序可以携带一旦提供了输入,就将该信息(无论如何代表您的是“护士”)传递给另一个班级,以执行您需要执行的任何操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM