我正在使用org.eclipse.jface.dialogs的Message Dialog,我需要在显示的按钮中重命名'Ok'和'Cancel'文本。怎么去?
答案 0 :(得分:2)
MessageDialog requestRestartDialog = new MessageDialog(window.getShell()," Title",null, "要显示的消息",MessageDialog.CONFIRM,new String [] {" String 1"," String 2" },0); int index = requestRestartDialog.open();
index将返回指定标签的数组索引。