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);
}
CameraMonitor.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:wiimote-paintboard
作者:
评论列表
文章目录