How to create an array of JButtons and How to implment it ...

This is what i want to do - I want to create an array of JButtons that has 8 rows of 8 buttons, could someone help me with this (im creating a checkers board) all i need is the array of buttons and them in 8 rows of 8 buttons .... im pretty confident in the way of making them do what i want but need help getting it up and running .... please note it is to be done in the swing environment and not in a applet or anything - ie in a JPanel and a JFrame .... any help would be GREATLY appreciated.

U can try this
        JButton b[][] = new Button[8][8];
     setLayout(new YourLayout());
     for(int i =0; i<8; i++)
          for(int j =0; j<8; j++)
               b[i][j] = new Button("Test");
               b[i][j].addActionListener(new YourAction());
               add(b[i][j]);
     }               

Similar Messages

  • How to create the servlet as acontroller  and how to use it

    how to create the servlet as acontroller and how to use it

    >
    John
    Please update your forum profile with a real handle instead of "914824".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I am going to have over 50 buttons in a page, Why? This would be a most unusual UI paradigm. I've never seen such a page, which suggests that whatever you want to do is normally done another way. Please explain the requirement in more detail.
    just wanted to know if its possible to do something like this in java.
    Java is not used in programming APEX UI behaviour. Java and JavaScript may share initial syllables, but they are not closely related.
    It's possible to achieve a great deal in JavaScript, but a clear definition of the requirements is necessary. Do you mean the buttons should be dynamically generated? If so, yes, this is possible in JavaScript. What would drive the process?
    Also, i would like to have dynamic action on it, for example, when the button is pressed, fill a string of text into other items(text field) within the page. Without more detail its not possible to make any specific suggestions. For example, I certainly would not want to create 50+ individual dynamic actions relating to different buttons.

  • How to create documentation for report programs and how to use it

    how to create documentation for report programs and how to use it in the selection screen by placing an icon in the Applicatin Tool bar. If i click this icon the help documentation has to display.
      Note: Exaple <b>RSTXSCRP</b> programs selection screen

    Hi
    1 goto SE38 transaction, give the program name
    2 Click on documentation radiobutton & then press change
    3 Write your PURPOSE, PREREQUISITES etc details
    4 Save the same & Activae it.
    The icon will come automatically on selection screen
    Thanks
    Sandeep
    Reward if useful

  • How to create Implicit Fact column ?and how to use it ?

    Hi all,
    How to create Implicit Fact column ?
    and how to use it ?
    Thanks in advance

    When you create a request with only dimension columns, the Oracle BI engine has to choose a fact table to join the dimensions to each other. If you have multiple fact tables in your BMM layer, the Oracle BI engine will use the most economical fact table, depending on the number of dimensions of the fact table.
    In some cases you do not want to use this fact table, but you want to force the Oracle BI engine to use the fact table you want.
    In that case you should create a fact (or select an existing fact) of the fact table you want to use for the dimension only query. In the presentation catalog of the subject area you should select this fact as the implicit fact. This fact will always be used in the query, but it won't be visible in your report. An example of an implicit fact is the count of the primary key (id) of the fact table.

  • How to create an array with controls and indicators?

    I want to create a scrollable array of control/indicator pairs from a config file.  Something that looks like the attached image.  Of course, I can only create an array that's either either a control or indicator -- not both (the operator should not be able to edit the name or change the state of the LED).  So I guess I need to split the array and have two side-by-side and SOMEHOW link the scrollbars.  But then I have no idea how I can get the control switch states from the array.  Is there an easier way to do what I'm trying to do?
    Attachments:
    New Bitmap Image.JPG ‏11 KB

    Hello,
    Another option would be to use the custom control I built for you, see below.  You can just drop this into an array, it should look like your example (more or less).
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Custom Switch.ctl ‏8 KB

  • How to create execution plan in DAC and how to start ETL steps

    Hi,
    For ETL configuration i have installed and configured,
    1. Oracle 10G DB
    2. obiee and obia 7.9.6
    3. informatica server (here i created repository and integration services)
    4. DAC server 10g (setup for DAC is also configured like create warehouse tables etc.,
    same installation done on windows for client.
    Now i'm struck with execution plan creation.
    then
    how to start ETL, where start ETL
    Source : Oracle EBIZ R12.1.1
    target : Datawarehouse (10G DB)
    please help me out the steps till ETL start ?
    Thanks,
    Srik

    Hi Srik
    I am assuming you have followed the steps required before a load in the library for dac config, csv lookups etc...
    Did you check out the example in the documentation?
    Here is the link
    http://download.oracle.com/docs/cd/E14223_01/bia.796/e14217/windows_ic.htm#BABFGIHE
    If you follow those steps and run the execution plan and you can monitor the progress under the current run tab in the dac and the infa workflow monitor.
    Regards
    Nick
    Edited by: Nickho on 2010/06/21 9:24 AM

  • How to create a new company code and how to assign it to billing units?

    i am working on roll out project.....please help me in creating a new company code....

    Hi,
    You have raised this query in wrong Forum. Please raise ur query in the relevant forum.
    rgrds,
    Randhir Soni

  • How to create a file in memory and how to open it?

    Hi All,
    Warm greetings...
    I bundle a file in encrypted form with my project's distribution. User may need to see this file while working on it. I want to load this file in memory, decrypt it there and then display its content to user in read only form.
    Is there any way to do this.
    Best

    Christi wrote:
    I bundle a file in encrypted form with my project's distribution. User may need to see this file while working on it. I want to load this file in memory, decrypt it there and then display its content to user in read only form.
    And what happens if the OS swaps your application to hard drive while the user goes to lunch? Is that or is that not a problem?
    In some business domains that is a problem and in others it isn't.

  • How to create 2D array with 3 rows and unlimit column?

    how to create 2D array with 3 rows and unlimit column?

    Here are images of what I described in my previous post
    Message Edited by JoeLabView on 11-14-2007 07:56 AM
    Attachments:
    2D-array_code.PNG ‏7 KB
    2D-array_values.PNG ‏13 KB

  • How to create a oval shape JButton?

    Dear All,
    Can you please tell me how to create an Oval shaped Jbutton. Please send me code if possible.
    Regards,
    Sat

    You can check out the Substance look-and-feel project at:
    https://substance.dev.java.net/
    https://substance-button-shaper-pack.dev.java.net/
    A substance plugin is also available for NetBeans:
    http://www.netbeans.org/kb/50/substance-look-and-feel.html

  • How to create a drop down box and text box in screen painter?

    Hi i am totally new to this concept of screen painter..please can any tell me
    how to create drop down box in screen painter?
    How to create or display default date and time values?
    How to create text box for giving comments?
    How to store the records that we are entering in a table?
    Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.

    Hi,
    Check all these.
    1.how to create drop down box in screen painter?
    To get Drop Drown Box on screen .
    Follow these steps.
    1.
    Go to T.Code SE51 and Select Laypout for the Screen.
    2.
    Double click on the field for which u want Dropdown box.
    3.
    Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
    4.
    Save and Activate ur screen .
    5.
    Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
    6.
    The following code should be written under PROCESS BEFORE EVENT in the MODULE.
    TYPE-POOLS :vrm.
    DATA:
      i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
      w_natio LIKE LINE OF i_natio.
    DATA:
    BEGIN OF i_t005t OCCURS 0,
        land1 TYPE t005t-land1,
        natio TYPE t005t-natio,
    END OF i_t005t.
    IF i_t005t[] IS INITIAL.
      SELECT land1 natio
         FROM t005t
           INTO TABLE i_t005t
       WHERE spras = sy-langu.
      IF sy-subrc = 0.
      LOOP AT i_t005t .
          w_natio-key = i_t005t-land1.
          w_natio-text = i_t005t-natio.
          APPEND w_natio TO i_natio.
          CLEAR w_natio.
      ENDLOOP.
      ENDIF.
    ENDIF.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
                          id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
                    values = i_natio
    EXCEPTIONS
       id_illegal_name = 1
                OTHERS = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2.1.How to create or display default date and time values?
    1.
    create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
    2.
    Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
    3.How to create text box for giving comments?
    1.
    Define one variable in the TOP include with type STRING means Global variable.
    2.
    Create one input field by giving screen field name which u have defined in the above step.
    4.How to store the records that we are entering in a table?
    For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
    Check the following steps to handle Table control.
    1).
    U should take one variable in your internal table or in structure which
    is used for table control fields
    ex :
    data :
    begin of itab occurs 0 ,
        mark type c , "This is to select the record.
        matnr like mara-matnr ,
        matkl like mara-matkl,
        maktx like makt-maktx,
    end of itab .
    Controls: TABC types TABLEVIEW using screen 100.
    2).
    This mark variable should be given in Table control properties.
    follow the path
    double click on the table control-->attributes .->select
    w/SelColumn and in that itab-mark. Check in the figure.
    [Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
    3).
    After that. Take this example.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL tabc
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    LOOP AT ITAB.
       Module read_table_control.
    ENDLOOP.
    module user_command_0100.
    In this Module read_table_control, You should write the following code
    MODULE read_table_control INPUT.
    MODIFY itab INDEX tabc-current_line."( This will update the
    "ITAB table MARK field with 'X ' whatever we have selected
    "on table control.)
    ENDMODULE.
    4)
    If you want to Delete some of the records from Table control
    follow this code …Create one pushbutton and give Fucnction code to that
    and write below code
    CASE OKCODE.
    WHEN 'CREATE'.
    LOOP AT itab WHERE mark = 'X'.
    "Use UPDATE statement to create new record.
    ENDLOOP.
    ENDCASE.
    I hope that you will get something.
    Regards,
    Venkat.O

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

  • How to Create a Page LOV Template and a Region LOV Report Template in APEX

    Hi All,
    Thanks in advance ..
    I am new to APEX , Currently working in APEX 3.2
    Can any one please guide me How to Create a Page LOV Template and a Region LOV Report Template in APEX
    So that I can create dynamic Multi column LOV in APEX
    Cheers
    Sachin

    Sachin,
    I think you are en-quiring about 'Custom pop-up page'. See this link. You will get all required info there.
    Regards,
    Hari

  • Is it possible to create a single texbox? and how to delete a button on a form? please asap, badly n

    Is it possible to create a single texbox? and how to delete a button on a form? please asap, badly needed it right now. thx -regards gustavo

    Hello Gustavo,
    You can create a single textbox using the textbox option here (This is for you to enter text - not for the visitor): http://jingsite.businesscatalyst.com/jing/2013-09-30_2212.png
    If you want to create a textbox for the visitors to enter text, then you need to enter a form, and you can delete the "message" field from the "simple contact" form, but not the name and the email fields (those are mandatory and can't be deleted).
    You may want to check external forms in case you want to have the form rather customized, to check if you can have forms with single textbox. An example would be "Jotform".
    Hope this helps.
    Cheers
    Parikshit

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

Maybe you are looking for

  • Report fonts mapping and PDF output problem(Easten European languages)

    Hi experts, I have such a problem. If i run oracle reports(10g) via reports builder all layouts looks fine. When i run them in PDF format via application server - report text and numbers strech out off frames, also textfields and text itself becomes

  • List of odd stuff happening after a clean install

    Hey I just got my Powerbook G4 back from repair, it needed a new hard drive. Anyways I've noticed some odd behavior since I have gotten it back from apple. First they saved the Admins short name as "a" which is really annoying anyway I can change the

  • Redirect help

    I have a servlet that gets submited to, and it will send out an email. Some time it take longer than usual so I want the servlet to be able to display a message like "Please wait...", then once the email is sent the servlet will redirect them. How ca

  • GCU: What is considered a "new video game" to qualify for 20% off?

    nt

  • Using BADI_LE_SHIPMENT to change value in XVTTK

    Hi, I want to change signi value in xvttk. I use CHA_SHIPMENTS_AT_SAVE parameters in badi BADI_LE_SHIPMENT. But it doesn't work. These parameters FLAG_TRA_COMPLETE and TRA_SAVE_CALLER, is impartant or not ? How I can change signi value in xvtts. Than