• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java's gui event system.

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

How does java's event system internal works?

I'm implementing 3d engine with java, and i want catch mouse events in my polygon. Is it possible without Components?? Or actually i want implement my own class, which behaves like Componet.

Artsi
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You can attach action listeners (or any listeners) for a GUI component. You can have your own custom component if you wish.

Internally, the events that get generated on the UI because of user actions, are queued and then piblished on to the listeners that have registered to listen to those components' acions. You may read the EventQueue class which might make things more clear.

And one more suggestion. Its better if you change your display name before Jessica notices it
 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. Thnx! I will change my name for Jessica, but it is very common in finland that people have this kind surnames, like "The Great", "Best of"... yeah..
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Arto"-
I appreciate your attempt to change your name but its not quite right -- our naming policy needs you to have a first and a last name... AND it should be not obviuosly ficitious. As I'm sure you know, you can change your display name here.

Thanks! I really appreciate it.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Our Swing/AWT forum is the best place to ask questions about events and components and such. I'll move this over there for you.
reply
    Bookmark Topic Watch Topic
  • New Topic