Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to write Custom Events in Java ?

 
Shania nagapaga
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can u provide a simple sample code for writing custom-events in java
thanks
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is definitely not the correct forum for this question. Why don't you try Java in General (intermediate) or Swing / JFC / AWT Forums?
 
Shania nagapaga
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris !!
I didn't maen it for events for Swings/AWT.
I meant for server side (non-gui) events.
pl... don't loose ur temper ....
regards
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then what do you mean by event? You can't write your own life-cycle methods. What exactly are you looking to achieve?
 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Sorry to interrupt
I believe he is trying to refer the business events like OrderConfirmedEvent in say a purchase module so that the same can be used for some other functionality(like invoking a method of bean containing the behaviour of Shipment process)
Regards
Kala
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can refer to PetStore for example on creating CustomEvent.
If you can tolerate a less than standard english explanation, you can refer to my site for a stripped down version of the petstore example.

http://sg.geocities.com/low_hanming/framework/framework.htm
Cheers.

Han Ming
 
Shania nagapaga
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks HanMing,
ur link explains the topics what I needed.
I am going through it .....
thanks again
bye
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you are looking for is a Web Framework then I suggest you check out Struts.
 
Shania nagapaga
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks chris, for ur suggession.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic