Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-12-2008, 08:53 AM
Mir Mir is offline
Senior Member
 
Join Date: Mar 2008
Posts: 447
Mir is on a distinguished road
Check Menu active
Hi all

I have a problem in check menu item is active or not. In the Active button ,what i want when some one click on active button then show Message ,it is in use. Plz help[ me

Code:
import java.awt.*; import javax.swing.*; public class Abc extends Dialog { private Button button; private Checkbox ACTIVE; public Abc(Frame parent) { super(parent,"lock", false); setLayout(new BorderLayout(15,50)); setResizable(false); Panel lab = new Panel(); lab.setLayout(new GridLayout(5,30)); add("Center", lab); button = new Button("OK"); ACTIVE = new Checkbox("Mark"); boolean active; Panel p = new Panel(); p.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); p.add(ACTIVE); add("East",p); p.add(button); add("East",p); ACTIVE.setState(false); pack(); Point fatherLocation = parent.location(); move(fatherLocation.x + 150,fatherLocation.y + 200); show(); } public boolean action (Event evt, Object arg) { if (evt.target instanceof Button) { if(evt.target == button) { hide(); dispose(); return true; } else if(evt.target== ACTIVE) { // Here i want to check } } return false; } public boolean handleEvent (Event event) { switch (event.id) { case Event.WINDOW_DESTROY: dispose(); return true; default: return super.handleEvent(event); } } }
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create Popup Menu with Sub Menu while right-clicking the JTree Node?? Kabiraa AWT / Swing 7 05-09-2008 09:54 AM
How to change backgrnd color of link(active) Captainz New To Java 1 05-03-2008 01:10 AM
How do I modify a specific component within a active internalframe? LearningJavaASAP AWT / Swing 1 04-24-2008 08:35 PM
Active Content enable problem kasipandian JavaServer Pages (JSP) and JSTL 0 02-01-2008 04:15 PM
Accessing Active Directory javaplus Advanced Java 1 01-05-2008 01:25 AM


All times are GMT +3. The time now is 02:55 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org