Use this row to display information to the user:
JOptionPane.showMessageDialog(null, "Test");
Use this row to get information from the user:
String s = JOptionPane.
showInputDialog("Get me some input dude!");
Example:Add this code into a new Notes Java agent and run it from the Notes client:
import lotus.domino.*;
import javax.swing.JOptionPane;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
/* Display message to user - like Notes MsgBox or MessageBox */
JOptionPane.showMessageDialog(null, "Test");
/* Display message to user and get user input - like Notes InputBox */
String s = JOptionPane.showInputDialog("Get me some input dude!");
/* Display the input */
JOptionPane.showMessageDialog(null, s);
} catch(Exception e) {
e.printStackTrace();
}
}
}
Technorati tags:
Lotus Notes, Domino, Java, MessageBox, msgbox, InputBox