Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 6th, 2003, 11:39 PM
Registered User
 
Join Date: Oct 2003
Location: Mentor, OH, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to egiblock Send a message via MSN to egiblock Send a message via Yahoo to egiblock
Default help with Events

been working with the Beginning Java 2 (1.3 edition.)
page 629 working with the SketchFrame java file..

i don't understand how to create event handlers for when someone clicks on the menu and clicks on exit.. where do i define the exit button so when someone clicks on it, it closes the program..

Here's some of my code:

Code:
quitProgramAction = new FileAction("Quit Program",KeyStroke.getKeyStroke('Q', Event.CTRL_MASK));
Code:
addMenuItem(fileMenu, quitProgramAction);
Code:
private JMenuItem addMenuItem(JMenu menu, Action action)
{
JMenuItem item = menu.add(action);

KeyStroke keystroke = (KeyStroke)action.getValue(action.ACCELERATOR_KEY);
    if(keystroke != null)
      item.setAccelerator(keystroke);
      return item;
}

any help is greatly appreciated
thanks..





--
Eric Giblock
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Events bschleusner C# 2005 2 February 26th, 2007 05:25 AM
Page Events aware Javascript 2 November 8th, 2006 07:01 AM
Events not firing in IE malk ASP.NET 1.0 and 1.1 Professional 7 August 29th, 2006 01:32 PM
Customised events in C# LowFlyer VS.NET 2002/2003 2 July 15th, 2004 01:53 PM



All times are GMT -4. The time now is 07:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.