Why doesn the book teach event handling? Doesn every Java programmer need to know how to handle events?
This is a book about computing concepts, not about writing Java applets. There are many excellent Java books on the market. (Only modesty prevents me from mentioning the bookCore Java by myself and Gary Cornell.) Event handling in Java is complex, especially for beginners. There is no doubt that Java programmers need to master it, but I do not believe that the first programming course is the appropriate place. (This could change in the future when tools become widely available that produce the event handling code automatically, as in Visual Basic.) Consider this example, from page 28 of an introductory programming book that ought to remain unnamed. (It is Deitel & Deitel). // Addition program import java.awt.*; // import the java.awt package import java.applet.Applet; public class Addition extends Applet { Label prompt; // prompts user to input TextField input; // input values here int number; int sum; // setup the graphical user interface components // and initialize variables public
Related Questions
- Are lectures or other special events ever held at Discovery Times Square Exposition? Can I book a private party or event?
- Is the book of Revelations talking about real events or is it all a bunch of parables like how Jesus used to teach?
- Net has built in support for events and event handling. How is this converted?