DBConnection.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:AgentWorkbench 作者:
/**
 * This method puts the value of 'toClipboard' to the clipboard
 * In case of an SQL-Error, the SQL-Statement will be placed in
 * such a way and can be used in an external application as well.
 * @param toClipboard String which will be placed in the clipboard
 */
public void put2Clipboard(String toClipboard) {
    if (Application.isOperatingHeadless()==false) {
        // --- Only in case that Agent.GUI is operated with graphical representation ------
        StringSelection data = new StringSelection(toClipboard);
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        clipboard.setContents(data, data);  
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号