【问题标题】:How to create an event on a Graphics2D object in java如何在 java 中的 Graphics2D 对象上创建事件
【发布时间】:2014-03-05 01:45:15
【问题描述】:

请问您知道如何将自定义鼠标事件添加到 graphics2D 对象吗?

image = ImageIO.read(map_file);
logo_maps = ImageIO.read(map_file_logo);
Graphics2D test;
test = image.createGraphics();

test.setColor(Color.red);
test.drawImage(logo_maps,l.getX(),l.getY(), 20, 20,this);
test.drawString(l.getLibelle(), l.getX(),l.getY());

【问题讨论】:

    标签: java image awt mouseevent graphics2d


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-27
    • 1970-01-01
    • 2023-03-06
    相关资源
    最近更新 更多