Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: which listener to use on video panel?

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default which listener to use on video panel?

    hi, can anyone answer a quick and hopefully easy question?
    i have panel = window(new frame) and its used to render a video image on, i need to pickup a touchscreen press change of event but not sure which event listener to use and on which component. Any ideas?
    Is it a panel, window or frame event? and which listener would detect a focus change or a mouse press

    I know mouse listener and focus listener and window listeners are available but not sure they would be able to detect the screen press on the video rendered image

    thanks in advance
    jbste


  2. #2
    Junior Member
    Join Date
    Jun 2014
    Posts
    15
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Re: which listener to use on video panel?

    To know which listener you need to use you need to know what kind of events this touchscreen device generates. Most touch screen controllers emulate a normal mouse where a finger press on the screen is represented as a left MB click. This means you will likely be listening with a MouseListener for the MouseEvent, MOUSE_CLICKED. Notice this is a MouseEvent. The listener can be attached to any of the Panel, Window or Frame.

Similar Threads

  1. How i can create a Panel in the same
    By websit in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 6th, 2013, 08:53 AM
  2. Help with bouncing on a panel
    By hellhunt in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 9th, 2012, 07:28 PM
  3. Replies: 0
    Last Post: November 16th, 2012, 04:25 AM
  4. Replies: 2
    Last Post: March 16th, 2011, 06:32 AM
  5. Panel Problems?
    By Dellick17 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 22nd, 2010, 01:31 PM