How to create Action or event?

Hello to everyone!!! I'm wondering, how can I give Action or Event to the buttons in this case?
I know how to do like this:
JButton button1 = new JButton ("Button1");
button1.addActionListener (new Action.....)But in this case:
import java.awt.*;
import javax.swing.*;
public class JFrameExample {
  public static void main(String[] args) {
  //  WindowUtilities.setNativeLookAndFeel();
    JFrame f = new JFrame("This is a test");
    f.setSize(400, 150);
    Container content = f.getContentPane();
    content.setBackground(Color.white);
    content.setLayout(new FlowLayout());
    content.add(new JButton("Button 1"));
    content.add(new JButton("Button 2"));
    content.add(new JButton("Button 3"));
    f.addWindowListener(new ExitListener());
    f.setVisible(true);
}

JButton button;
button = new JButton ("Button1");
button.addActionListener (new Action.....);
content.add(button);
button = new JButton ("Button2");
button.addActionListener (new Action.....);
content.add(button);
button = new JButton ("Button3");
button.addActionListener (new Action.....);
content.add(button);

Similar Messages

  • How to create a recurring event in SharePoint 2010

    Hi there,
    I want to know how to create a recurring event that is 2 weeks long and start Monday. I want this event to recur every 4 weeks. I'm trying to create a schedule for two guys who work in the field.
    One guy works for 2 weeks in every 4 weeks starting on Monday.
    Thanks a million.
    Joe

    http://office.microsoft.com/en-in/sharepoint-server-help/sharepoint-calendars-i-make-the-most-of-your-team-calendar-RZ010255072.aspx?section=5
    You'll add items one at a time by clicking New Item on the
    New menu. Then you'll enter the item's details in a form. One other thing we should mention: It's easy to create recurring items, such as a weekly staff meeting. You do this by selecting the
    Make this a repeating event check box and then setting the item's recurrence pattern (for example, for a weekly lunch meeting you would set the pattern to weekly).
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/e3b81c14-3217-4450-89ea-627620c126c2/recurring-events-in-calendar-view-of-sharepoint-2010-lists
    The Recurrence Data field is unique to the Event Content Type. I don't see any way to add it to an existing list. You would need to recreate your list using Calendar list as the base if you were to use this approach.
    http://blogs.technet.com/b/sharepointdevelopersupport/archive/2013/04/11/how-to-make-the-sharepoint-calendar-events-recurring-by-default.aspx

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • How to create an RDBMS event generator using wlst on weblogic 10.3

    how to create an RDBMS event generator using wlst on weblogic 10.3, i got a code fragment needing class "com.bea.wli.management.configuration.RDBMSEventGenChannelConfiguration"
    but i can' t find this class in classpath on weblogic 10.3, pls help me, thanks. code sample is better.

    Hi,
    RDBMS Event Generator Channel Rule Definition
    When you are creating channel rule definitions in the WebLogic Integration Administration Console, it is recommended that you do not use the Back button if you want to resubmit the details on a page.
    You should always use the navigation links provided and create a new channel rule definition.
    http://download.oracle.com/docs/cd/E13214_01/wli/docs85/deploy/cluster.html
    http://download.oracle.com/docs/cd/E13214_01/wli/docs81/relnotes/relnotesLimit.html
    http://otndnld.oracle.co.jp/document/products/owli/docs10gr3/pdf/deploy.pdf
    This problem has been seen in the past when defining the channel rule for an RDBMS Event Generator if schema name was specified with the incorrect case (i.e. lowercase when it should have been uppercase or vice versa). To that end, it is suggested to change the case of the schema when creating the channel rule
    Regards,
    Kal

  • How to creat Action Profiles in CRM

    Hello Experts,
    Can any one guide me how to create Action Profiles in CRM for attaching the smartform ????
    Regards,
    Amol Tambe.
    SAP CRM Technical Consultant.

    TR: SPRO --> IMG -->Customer Relationship Management -->Basic Functions -->Actions -->Actions in Transaction >Change Actions and Conditions>Define Action Profiles and Actions
    Best Regards,
    Vishant

  • CS3: how to create action to add fixed text of foreground color, etc.

    I'm trying to create an action and/or brush preset(?) that will:
    1) Add a fixed text string in the forground color, consistent font, size, etc.
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
    3) Allow me to move the text to whatever position
    4) Change text layer opacity
    5) Flatten
    At some point in the past when searching the internet I came upon a description of how to create a brush preset (I think that was it) that did at least most of this, but somehow I seem to have lost the preset and don't know how to recreate it.
    thanks,
    Mike

    j_m_d wrote:
    I'm trying to create an action and/or brush preset(?) that will:
    1) Add a fixed text string in the forground color, consistent font, size, etc.
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
    3) Allow me to move the text to whatever position
    4) Change text layer opacity
    5) Flatten
    At some point in the past when searching the internet I came upon a description of how to create a brush preset (I think that was it) that did at least most of this, but somehow I seem to have lost the preset and don't know how to recreate it.
    thanks,
    Mike
    First it is And/or you can create both or one or the other. For in actions  and scripts you can not automate the use of a brush.
    1) Add a fixed text string in the forground color, consistent font, size, etc.
        Easy if all images are the same size and a little more work if image size vary for you will need to scale the image.
        If you want to scale the image back to it original scale at the end of the action you need to use a little script in the action. .
    2) Apply a consistent Layer Style -> Bevel and Emboss setting
        Again easy if aoo images are the same size not posible if images vary in size for many setting in layer style are in absolute pixel size.
        However layer styles will look good for a range of images sizes like Print Size or thunbnail size or small web sizes.
        Therfore I create actions for print size images and work full size. if I need smaller image I work full size and resize before output.
    3) Allow me to move the text to whatever position
         This is quite easy to do in an action you simply add an interactive transform step after adding the text layer.
         However this is not a good idea if you want to batch the action. Interactive sort of defeats batch.
         With an action it is easy to posion a layer.
    4) Change text layer opacity
        Simply change the added text layers opacity and or fill and it will be recorded.
    5) Flatten
        Simple just record it I don't like actions that flatten though. If you give your action to some and the use it on an image the did a lot of work on the may get very upset the your acrion flatten all their work.
    Have a look at my Crafting Actions Package it cantains a sample action that add a text copyright layer to any size image.
    Package Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    12 Scripts for actions
    Example
    Download

  • How to create Action links in OBIEE 10.1.3.4.1

    Hi gururs,
    I have a requirement where they need a action link to sibel data but in 10 g there is no option in drill down of Value interaction for coloumn values ,how to create it in 10g can any tell me all step by step procedure?

    Hi,
    I don't know how it can be done with JDev 10. However, JDev 9 provides automatic stub generation for web services.
    In JDev 9 its in file > New > stub for web service(As I remember).
    I just checke with JDev 10 help.
    Download the .wsdl file,
    Include .wsdl in project
    Right click .wsdl and generate stub.
    (Posted in other thread also)
    Abdul Wahid
    Edited by: Abdul Wahid on Aug 28, 2009 11:06 PM

  • How to create a recurring event that ends on a certain date

    How do you create a recurring event in Ical that ends on a certain date?? I have an event on my calender that happens every week same date and time but will end in a couple of months.

    Create an event. Edit it. There is an option in the edit window for "Repeat".  Once you set how often the event repeats you get an option for "end", which is where you can specify, well, the end.
    charlie

  • How to create a discrete event Simulator in java

    I want to create a discrete event simulator in java to communicate between 1000 hots on the same machine.Can anyone help me with that???

    So I figured out how to create one, but when I try to do personProfile.save(), its always coming back as false. Any ideas why this might be?

  • How to create a time event without having user interface freeze

    Hi,
    I am new to labwindows and i am trying to create a time event where every hour for 24 hours i want my program to write somethign in excel. 
    I tried using function Delay and SyncWait and those functions freezes up the user interface.
    Any tips/help will be appreciated.
    Thank You
    Solved!
    Go to Solution.

    Many, if not most, CVI developers wind up implementing a delay function for themselves that periodically, during the delay, wakes up and processes events so that the GUI isn't frozen.
    The idea is to break the wait or delay up into pieces, and process system events in between each piece.
    A timer works too, you can try the async timer that Wolfgang mentioned, it runs a bit better and on a separate thread, so it lets you do what you normally would with the main thread and the GUI, yet still get timer function.   If you use a smart delay, you still wind up doing nothing a great deal of the time, and events are only processed periodically.

  • How to create native key events

    Hello
    can someone tell me please if (and if yes, how) it is possible to create native, therefore by the underlying recognized key events? My Java-App needs to send several key inputs which are also required to be noticed by Windows...
    Thanks
    Matthias

    see java.awt.Robot

  • How to create a keypress event for ANY key on the keyboard that is pressed ? (not a specific key.)

    I realise that if I use:
    if (e.which == 81) {
    do whatever
    I can activate an action based on key 81 being pressed.
    But how would I do the same, regardless of what key is pressed?

    Sorry, figured it out...
    I just don't need to specify an if..... at all.
    Duh!

  • How to create a recurrent event on the first or last work day of the month

    The lightning calendar allows selection of the first and last day of the month for recurrent events but for business I need to use the first and last WORK day of the month (Monday - Friday) to schedule particular tasks. In the calendar preferences under 'View' I can select the days that make up the work week but this does not transfer to an option in recurrent events. Is there another way to do this or is it just not available?

    Hi there,
    do know for the UlltimateBootCD4Win? This from CD bootable WinXP-BartPEedition with additional tools gives you the ability to make such things like partitioning, backup or formatting your HDD.
    It has many more applications which help you to maintain your system without booting your original OS.
    So I think that this CD will solve your partitioning issues.
    Heres a link: www.ubcd4win.com/
    Just try it and tell me your opinion.
    Nice weekend and greetings from the sunny south ;)

  • How to create new business events in SAP?

    Hello my name is Karen I am new in the HR department.
    Althought I work in HR Im also the training coordinator. My organitation is a new company and we are just implementing SAP.
    During the whole 2013  none of the courses given were upload to SAP. I need to upload all of them. I have not use SAP. I have a cupple of question.
    What transactions to use in order to upload the courses we have offered and the participants?
    Is there a way we can upload massively?

    Hi
    you can crete Transaction code in Transaction SE93.
    To create a transaction code:
    Enter a transaction code (up to 20 characters).
    Choose Create.
    A dialog box appears. Enter a short text and choose the transaction type.
    The transaction type can be as follows:
    Dialog Transactions
    Report Transactions
    Object-Oriented Transactions
    Variant Transactions
    Parameter Transactions
    In a report transaction, you use a transaction code to start an executable program (type 1). An executable program usually has three steps - data entry (selection screen), data processing (often using a logical database ), and data output (list).
    To create a report transaction, use the Transaction Maintenance transaction (SE93). Once you have entered a transaction code and short description, choose transaction type Program and selection screen (report transaction).
    When you define a report transaction, you can specify the selection screen and variant with which you want it to start.
    You can also protect the report transaction against unauthorized use. To do this, enter the name of an authorization object in the corresponding field.
    Dialog Transactions
    In a dialog transaction, the flow of the program is determined by a sequence of screens. The screens that are called within a transaction should belong to a single ABAP program, usually a module pool (type M program).
    To create a dialog transaction, use the Transaction Maintenance transaction (SE93). Once you have entered a transaction code and short description, choose transaction type Program and screen (dialog transaction).
    You can create transaction codes for Custom query;s created using SQVI also
    Thanks & Regards
    Kishore

  • HCM P&Forms:How to create a user event and scenario step mapping

    Hi Friends
    I have a problem with Form Scenarios --> Other Attributes -->User Events:
    At present the values are: Operation :- the_operation_name
                                               Field Groups :- Field Group assigned
                                               Usable from scenario step :- Emp_Req_scenarion_stepname1
    I need to enter a new mapping here so that the operation is available in another scenario step as well.
    But in the edit I can enter only the operation name, not able to enter the scenario step.
    Can someone please suggest a solution or work around. Your inputs are appreciated.
    Thanks!
    Sajimol.
    Edited by: Sajimol Unni on Mar 2, 2010 11:54 PM

    Not quite true. A "user event" looks at what fields you selected for your "field group" for the event. Then ANY operation that has that field associated with it will get called (unless a "rule" stops it). User Events in HCM P&F are REALLY BAD in my opinion (I have ranted on them in many threads, blogs etc.). There are ways to deal with them and also ways around using them (see my blogs). I think this is one area in HCM P&F that needs a major overhaul/re-thinking.

Maybe you are looking for

  • Problem when deploying CRXIr2 + VS2005

    Post Author: Aksu CA Forum: Deployment I have a problem with report loading when I have deployed windows project. Everything is working fine in "development environment". I deploy the project with MS-installer and CRXIr2 merge module (CrystalReports1

  • Can't publish blog?

    Have been trying for 2 days now. Yesterday it would act normal until it got to the publish in the background part, then it said "network error - check internet connection." My connection is fine. Then over and over again various applications keep ask

  • [E2007] [EWS] [PS] $PR_Folder_path not returning correct value

    Apologies if this is something obvious but I'm trying to get the full folder path from an EWS Powershell script. I call the PR_Folder_Path extended property but it always returns: {MapiType: String Tag: 26293 } The code is: Function SearchFolder( $Fo

  • Adding a comment field in block for quality reasons subscreen of XK05?

    Hi Experts, I have requirement to add a comment field in block for quality reasons subscreen. I didn't find any BADI for this requirement. Kindly any one advise is it possible to add this comment field in XK05. Regards, Anusha

  • ADS: com.adobe.ProcessingException: XMLFM Exception  in ABAP Webdynpro

    Hi All,      When I test the ABAP Webdynpro with Adobe form embeded in it. I get very unreliable results.  When trying to bring up the forms, sometimes, it comes up the 2nd attempt, sometimes after several attempts. And the error message is : ADS: co