相关疑难解决方法(0)

如何在Windows 7中安装Python 2.x和Python 3.x.

我在Windows 7上使用Python 3.x进行大部分编程,但现在我需要使用Python Imaging Library(PIL),ImageMagick和wxPython,所有这些都需要Python 2.x.

我可以在Windows 7中安装Python 2.x和Python 3.x吗?当我运行脚本时,我如何"选择"应该运行哪个版本的Python?上述程序是否能够同时处理多个版本的Python?我已经搜索了几个小时和几个小时来如何做到这一点无济于事.

谢谢.

python windows compatibility backwards-compatibility build-environment

221
推荐指数
9
解决办法
22万
查看次数

Java,如何绘制不断变化的图形

之前没有这样做过,所以显然我很沮丧.这里,当前鼠标位置周围的64个像素在表单上绘制得更大.问题是,它有点'缓慢',我不知道从哪里开始修复.

除此之外,我创建了一个线程,它在完成后不断调用更新图形,并且像文本一样点fps,以显示事物的绘制速度.

图像示例:(图像来自Eclipse中的字母'a')

替代文字

代码示例:

@SuppressWarnings("serial")
public static class AwtZoom extends Frame {
    private BufferedImage image;
    private long timeRef = new Date().getTime();
    Robot robot = null;

    public AwtZoom() {
        super("Image zoom");
        setLocation(new Point(640, 0));
        setSize(400, 400);
        setVisible(true);
        final Ticker t = new Ticker();

        this.image = (BufferedImage) (this.createImage(320, 330));
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent we) {
                t.done();
                dispose();
            }
        });
        try {
            robot = new Robot();
        } catch (AWTException e) {
            e.printStackTrace();
        }
        t.start();
    }

    private class Ticker extends Thread { …
Run Code Online (Sandbox Code Playgroud)

java graphics

8
推荐指数
2
解决办法
2万
查看次数