CameraMonitor.java 文件源码

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

项目:wiimote-paintboard 作者:
public CameraMonitor(WiimoteDataHandler dh) {
    super(Application.getInstance(WiimoteWhiteboard.class).getMainFrame(), Util.getResourceMap(CameraMonitor.class).getString("monitor.Action.text"));
    getRootPane().putClientProperty("Window.style", "small");
    setLayout(new MigLayout());

    dh.addWiimoteDataListener(this);

    canvas = new JPanel(null, true);
    canvas.setOpaque(true);
    canvas.setBorder(BorderFactory.createLineBorder(SystemColor.inactiveCaptionBorder));
    add(canvas, "w 50sp, h 50sp, grow, push");

    addKeyListener(new KeyAdapter() {
        @Override
        public void keyPressed(KeyEvent e) {
            if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                setVisible(false);
            }
        }
    });

    pack();
    setLocationRelativeTo(null);

    new Timer(true).schedule(new UpdateTask(), 0, REPAINT_FREQ);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号