当前位置: 首页>>代码示例>>Java>>正文


Java JOptionPane.showInternalMessageDialog方法代码示例

本文整理汇总了Java中javax.swing.JOptionPane.showInternalMessageDialog方法的典型用法代码示例。如果您正苦于以下问题:Java JOptionPane.showInternalMessageDialog方法的具体用法?Java JOptionPane.showInternalMessageDialog怎么用?Java JOptionPane.showInternalMessageDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JOptionPane的用法示例。


在下文中一共展示了JOptionPane.showInternalMessageDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OntologyClassTree

import javax.swing.JOptionPane; //导入方法依赖的package包/类
/**
 * Constructor of this class
 * @param root The root node where further nodes can be added
 * @param ontoClass The current instance of OntologyClass
 * @param ontologieSourcePackage The reference to the package of the ontology 
 */ 
public OntologyClassTree(DefaultMutableTreeNode root, OntologyClass ontoClass, String ontologieSourcePackage) {
	
	super(root);
	this.currOntoClass = ontoClass;
	this.searchInPackage = ontologieSourcePackage;
	this.rootNode = root;
	
	// --- Add the default nodes for an ontology ----------
	this.addDefaultNodes();

	// --- Add the nodes from the given ontology -----------
	this.addOntologyNodes();
    
	// --- Did we had an error here? -----------------------
	if (logMsgShow==true ) {
		// --- If an error occurs, show the message --------	
		String MsgHead = OntologyVisualisationConfiguration.getApplicationTitle() + ": " +  logMsgTitleOnto;
		String MsgText = ontologieSourcePackage + ":\n" + logMsgOnto;			

		// --- Send Message to user of AgentGUI ------------ 
		JOptionPane.showInternalMessageDialog(OntologyVisualisationConfiguration.getOwnerWindow(), MsgText, MsgHead, JOptionPane.ERROR_MESSAGE);
		
		// --- Add the Error to the current ontology class -
		currOntoClass.ontologyErrorStack += MsgText;
	}
	
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:34,代码来源:OntologyClassTree.java

示例2: actionPerformed

import javax.swing.JOptionPane; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent ae) {
	
	String actCMD = ae.getActionCommand();
	String msgHead = null;
	String msgText = null;

	if (actCMD.equals("OntologieAdd")) {
		// --- Add Ontology -------------------------------------
		String ActionTitel = Language.translate("Ontologie hinzufügen"); 
		OntologieSelector onSel = new OntologieSelector(Application.getMainWindow(), currProject.getProjectName() + ": " + ActionTitel, true);			
		onSel.setVisible(true);
		// === Wait for user ===
		if (onSel.isCanceled()==true) {
			Application.setStatusBar(Language.translate("Fertig"));
			return;
		}
		String newOntologie = onSel.getNewOntologySelected();
		onSel.dispose();
		onSel = null;
		// --- Add ontology ------------------------------------- 
		currProject.subOntologyAdd(newOntologie);
		
	} else if (actCMD.equals("OntologieRemove")) {
		// --- Remove Ontology ----------------------------------
		if (ontoTree.isSelectionEmpty()) {
			msgHead = Language.translate("Fehlende Auswahl !");
			msgText = Language.translate("Zum Löschen, wählen Sie bitte eine der dargestellten Ontologien aus!");			
			JOptionPane.showInternalMessageDialog( Application.getMainWindow().getContentPane(), msgText, msgHead, JOptionPane.INFORMATION_MESSAGE);
			return;
		}
		DefaultMutableTreeNode currNode = (DefaultMutableTreeNode) ontoTree.getSelectionPath().getLastPathComponent();
		OntologyClassTreeObject octo = (OntologyClassTreeObject) currNode.getUserObject();
		OntologyClass oc = octo.getOntologyClass();
		if (oc==null) {
			return;
		}
		currProject.subOntologyRemove(oc.getOntologyMainClass());
	
	} else {
		System.out.println("Unknown ActionCommand: " + actCMD);
	}
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:44,代码来源:OntologyTab.java

示例3: showErrorMessage

import javax.swing.JOptionPane; //导入方法依赖的package包/类
@Override
public void showErrorMessage(String msgText, String msgHead) {
	JOptionPane.showInternalMessageDialog(this, msgText, msgHead, JOptionPane.ERROR_MESSAGE);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:5,代码来源:ProjectWindow.java


注:本文中的javax.swing.JOptionPane.showInternalMessageDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。