Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java's gui event system.

 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • 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
 
Vijayendra V Rao
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • 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
  • 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..
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • 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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic