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
the above code dosenot work on web?????any solution
ReplyDelete[script]
ReplyDeletea = prompt("Hi!", "What's your name?");
[/script]
Thanks for the great tips
ReplyDeleteHi - I can get this to work, but when I click on the input box to add some text my Notes client screen goes white and Notes is very slow to respond. When I use my task manager I see a jvm running. If I go to this I can then see the dialog and respond accordingly. How do I overcome this problem? Thanks in advance, Fergus
ReplyDeleteThank you Nick :)
ReplyDeleteNice post ! If you want to training for this course pls visit us - www.infosectrain.com
ReplyDelete