Package com.britefury.mtawt.test

Source Code of com.britefury.mtawt.test.SimpleExample

package com.britefury.mtawt.test;

import com.sun.jna.Pointer;

import javax.swing.*;
import java.awt.*;

import com.britefury.mtawt.device.win7.Win7TouchDevice;

/**
* Created with IntelliJ IDEA.
* User: Geoff
* Date: 05/10/13
* Time: 12:15
*/
public class SimpleExample {
  public SimpleExample() {
    JFrame frame = new JFrame("Test");

    Container content = frame.getContentPane();
    content.setBackground(Color.lightGray);
    Canvas drawingArea = new Canvas();
    drawingArea.setPreferredSize(new Dimension(800, 600));
    //drawingArea.setBorder(BorderFactory.createLineBorder (Color.blue, 2));
    drawingArea.setBackground(Color.white);
    content.add(drawingArea);
    frame.pack();
    frame.setVisible(true);

    Win7TouchDevice device = Win7TouchDevice.forCanvasInFrame(frame, drawingArea);
  }


  public static void main(String args[]) {
    new SimpleExample();
  }
}
TOP

Related Classes of com.britefury.mtawt.test.SimpleExample

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.