package com.ruoyi.web.utils;

import java.awt.*;
import java.awt.datatransfer.*;

public class ClipboardUtil {

    public static void copyToClipboard(String text) {
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        StringSelection selection = new StringSelection(text);
        clipboard.setContents(selection, null);
    }

}
