Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

About Edit menu

  Asked By: Bill    Date: Sep 12    Category: Java    Views: 537

i want to implement edit menu. i know the coding for implementing cut, copy and paste functions but I want to make it behave like word 's edit menu that if no text in any text field is selected then menuitems( cut and copy ) should be disabled and when text is selected then these menu items should be enabled.

Basically listen text fileds of whole screen and enable or disable menu items according to text selection or not.

How can I do that .
plz help if any one knows. Reply soon



1 Answer Found

Answer #1    Answered By: Seth Anderson     Answered On: Sep 12

Design wise keep an eye on the state pattern. GUI wise add a listener to all components and change the state when selection  changes.

Didn't find what you were looking for? Find more on About Edit menu Or get search suggestion and latest updates.