How to enter values in JList box and JTable ???

Hi friends...
i am new to Swing
SInce i am using Netbeans IDE 5.5
and there is easy to do swing programming using this IDE
now i am confused using JTable and JList box
since i used method Insert in AWT
but how to add values in LIST BOX ( JList )
ex.
JList list = new JList( );
list.add(mystringvalue, ? );
here it ask for component so what should i write here..
when i write here this, gives error.
what to do to insert string or vector or object in JList
and to enter value in JTable
THanks

hi Ghanshyam,
i am also new to swing i was just wondering are you using the swing palette to create your interface
by the look of the code
JList list = new JList( );
list.add(mystringvalue, ? );you may not be because every JList is put in a JScrollPane
but if you do want to do it through the palette there is an option in properties - model which you can uses to add in values.
and if your looking to get info. from a database look up
AbstractListModel &
AbstractTableModel
the is a lot of info on the internet (example net beans CarTableModel) is a
good start off
happy hunting.
JJ

Similar Messages

  • How to get value from option box and submit accordingly

    Sorry for posting my question. I have been trying to edit message and repost it and not successful. Hence I am reposting my question. Please let me know.
    I am right now exploring JSF for presentation layer. I am designing a form with <h:outputLabel..> and <h:inputText...> for the user to input his value. I also have a radio button as below. <h:outputLabel..>
    <h:inputText...>
    <h:selectOneRadio id="libraryList" >
                                <f:selectItems value="#{libraryList}"/>
                            </h:selectOneRadio>And I have included the following piece of code in faces-config.xml as below.
    <managed-bean>
            <managed-bean-name>libraryList</managed-bean-name>
            <managed-bean-class>java.util.HashMap</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
            <map-entries>
                <map-entry>
                    <key>Pass</key>
                    <value>Pass</value>
                </map-entry>
                <map-entry>
                    <key>Fail</key>
                    <value>Fail</value>
                </map-entry>
            </map-entries>
        </managed-bean>Hence I get two option box as Pass and Fail.
    I am also bit aware of navigation rules of JSF. Now I want the user to take to the step 2 if he chooses the option Pass and if the user chooses Fail, then I want to reset the values of the above form and display the same form.
    I have not done any Java part of the application yet as I am a newbee and hence started doing JSP pages and config-faces.xml part. Please let me know how to proceed further.

    Create a bean, bind the value to the bean, let the action method return that value and add navigation-case entries for those outcomes.

  • Reset value of text box and still have user input as well.

    Hi,
    I currently have a PDF form that helps users print of labels depending what is entered into the first page and one of the boxes has an 'Additional Info' box that puts unto 10 characters onto one of the labels.
    This was made because a customer wanted something defining on the boxes so I included it on the box label now I have found another use for it.
    If a customer asks we can make a custom size curtain but only so many can fit in a box as we show on the label how many fits in the box depending on the size via icons and I have decided to use this extra info to define how many are in this box if the customer asks for a custom size and I have managed to be able to have a dialogue box that the user enters how many will be in the box and it will enter that into the extra info box but I have found no way of clearing it when we start using standard size again except from event.value = " " unfortunately this stops the user from being able to edit anything within the box as it clears as any calculation is run through again.
    I have tried using
    if (this.getField("SizeDrop").value == 'BE'){
    event.value = this.getField("csn").value + " IN A BOX"
    } else {
    event.value.defaultValue;
    but it will not clear the box but allows the user to clear it and be able to put any other information in it if required.
    is there anyway of having the box cleared after "SizeDrop" is changed from 'BE'?
    Thanks,
    Bruce

    Hi - Thanks for your time; I was trying to make it work without using the operator pattern MATCH within the prompt definition; i dont want to show the answers report to the user with the words like contains any, pattern match so i was trying to use the operator equal to/is in within the prompt definition which does not work
    thanks for your time

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How to enter values in the fields of standard SAP Infotype e.g. IT0024

    Hi,
    How to enter values in the fields of standard SAP Infotype?
    e.g. I want to enter values in infotype IT0024(Qualifications) in the field AUSPR(Profincy):-
    1-Level 1
    2-Level 2
    3-Level 3
    4-Level 4
    5-Level 5
    Thanks,
    Ameet

    Hi Divya,
    I checked with the screen and report which is mentioned by you. But I want to modify/make changes that should appear in the screen when you view details for a particualar employee in Qualifications(IT0024).
    Please refer the screen 2000 of module pool MP002400 in SE80. In that screen I want to make change as listbox with key.
    Can it be achieved in the same way as mentioned by you before by making standard SAP report as Z and then modify using layout editor?
    Please help me out. I think I am almost there.
    Thanks,
    Ameet

  • How to enter values to a database table with data type 'LCHR'?

    Hello All,
    I have created a database table with five fields, of which the last field is 'Value' field in which i have to enter text with a maximum of 1000characters. I have also specified a 'Length' field preceding the 'Value' field.
    The datatype specified for the 'Length' field is 'INT2' and for the value field is 'LCHR' with length 1000.
    When i tried inserting values to the table through a report, the report is giving an error that 'Literals that take up more than one line are not permitted', which means 255characters.
    Also, when i entered a short text which is less than 250 characters to the 'Value' field,, the report is working fine and the table entry is visible.
    Can anyone help me in this?
    It would be really helpful if you explain how to use 'LCHR' data type in tables and how to enter values to such a field with more than 255characters.
    Thanks in Advance,
    Shino

    Hi shino,
    Alternatively,
    you can use STRING instead of LCHR.
    I too have tried with LCHR and am facing the same issue.. i am not sure why its coming..
    i have tried STRING and its working perfectly.
    wa-key_field = 'IN4'.
    CONCATENATE  'Long text over 200 chars length '
                  'another Long text over 200 chars length '
                  'another Long text over 200 chars length '
                  INTO wa-long_text.
      wa-len = strlen( wa-long_text ).
      INSERT zshino_table from wa.
      SELECT * FROM zshino_table INTO table it.
      clear wa.
      LOOP AT it INTO wa.
          WRITE:/ wa-len, '  ' , wa-long_text.
      ENDLOOP.
    Also, remember to set the type of the database field as String.
    hope this was of some help,
    thanks and regards,
    Sagar.

  • How to enter text into text box in Pages '09

    When I manually select a text boxes in Pages, I can paste text into them. I can move from text box to text box using System Events to keystroke tabs but have not figured out how to get Applescript Editor to make the pastes. I am trying to use Applescript Editor to enter text into a pages document that is formatted for labels.

    I have downloaded template U-0089-02_P.doc from Avery, 14 boxes displayed in two columns of seven rows.
    Once you have clicked in the upper left box, the following script should enter text into every box, from left to right and top to bottom.
    tell application "Pages"
    activate
    tell application "System Events"
    keystroke "Box 1"
    keystroke tab & tab -- to go to the next column
    keystroke "Box 2"
    keystroke tab -- to go to the next row
    keystroke "Box 3"
    keystroke tab & tab
    -- and so on
    end tell
    end tell
    The problem is that I don't know how to enter the upper left box from the AppleScript Editor.

  • Migo(goods reciept),  -- how to enter recd. qty.in nos. and kgs. of a matl.

    Take an example of steel (angles, flats, plate or so).  He receives in 5nos. and 200kgs.
    In goods receipt how to enter the quantity in numbers and its weight both? In item detail, Quantity,of Migo screen there are 5 rows for entry. 1. Qty. in unit of entry.  In this what we enter is going to maintain in 2. Qty. in sku with respect to its base unit of measure.  Here the problem comes the qty. recieved may not be to the data mentioned in units of measure in material master. In practical it is different. If we mention the quantity received same as the sku(stock keeping unit) then the qty entered is ok. 3. Qty in PO price unit.  The details in this is the quantity received and its payment. 4. Qty in delivery note.  We mention the qty received in delivery note which is weight. 5. Qty ordered which is picking up from PO.  Please give the solution where to enter nos?  Thanking you,
    Srinivas

    Hi gurus,
    In this case, can I use the KANBAN correction to increase the KANBAN bin qty?
    Thanks
    Lim
    Singapore

  • How to assign Values to nested table and pass as parameter to procedure?

    How to assign Values to nested table and pass as parameter to procedure?
    Below is the Object and its type
    create or replace type test_object1 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type1 is table of test_object1;
    create or replace type test_object2 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type2 is table of test_object2;
    GRANT ALL ON test_object1 TO PUBLIC;
    GRANT ALL ON test_type1 TO PUBLIC;
    GRANT ALL ON test_object2 TO PUBLIC;
    GRANT ALL ON test_type2 TO PUBLIC;
    here is the table made of object type:
    create table test_object_tpe
    sl_num NUMBER,
    description VARCHAR2(100),
    main_val1 test_type1,
    main_val2 test_type2
    NESTED TABLE main_val1 STORE AS tot1
    NESTED TABLE main_val2 STORE AS tot2;
    here is the procedure which inserts values into nested table:
    PROCEDURE INSERT_TEST_DATA(sl_num IN NUMBER,
    description IN VARCHAR2,
    p_main_val1 IN test_type1,
    p_main_val2 IN test_type2
    IS
    BEGIN
    FOR rec in p_main_val1.first..p_main_val1.last
    LOOP
    INSERT INTO xxdl.test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    sl_num
    ,description
    ,test_type1 (test_object1(
    p_main_val1(rec).val1,
                                       p_main_val1(rec).val2,
    p_main_val1(rec).val3
    ,test_type2 (test_object2( p_main_val2(rec).val1,
                        p_main_val2(rec).val2,
                        p_main_val2(rec).val3
    END LOOP;
    commit;
    END INSERT_TEST_DATA;
    here is the anonymoys block which assigns values to the object type and pass values into the procedure:
    set serveroutput on;
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1(1).val1 := 'testx1';
    inval1(1).val2 := 'testx2';
    inval1(1).val3 := 'testx3';
    inval2(1).val1 := 'testy1';
    inval2(1).val2 := 'testy2';
    inval2(1).val3 := 'testy3';
    CSI_PKG.INSERT_TEST_DATA(sl_num => p_sl_num,
    description => p_description,
    p_main_val1 => inval1,
    p_main_val2 => inval2
    end;
    Can anybody correct me.
    Thanks,
    Lavan

    Thanks for posting the DDL and sample code but whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    How to assign Values to nested table and pass as parameter to procedure?
    >
    Well you are doing almost everything wrong that could be done wrong.
    Here is code that works to insert data into your table (the procedure isn't even needed).
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1.extend();
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');
    inval2.extend();
    inval2(1) := test_object2('testy1', 'testy2', 'testy3');
    INSERT INTO test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    (p_sl_num, p_description, inval1, inval2);
    commit;
    end;
    /See Example 5-15 Referencing a Nested Table Element in Chap 5 Using PL/SQL Collections and Records in the PL/SQL doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#CJABEBEA
    1. You don't even need the procedure since all it does is a simple INSERT into the table which you can do directly (see my code above)
    inval1(1).val1 := 'testx1';There is no element one (1) of 'inval1' since you haven't created any elements yet. You need to EXTEND the collection to add an element
    inval1.extend();And then there is an empty element but 'inval1' is a container for objects of type 'test_object1' not for scalars like 'val1', 'val2', and 'val3'.
    So you can't do
    inval1(1).val1 := 'testx1';You have to create an instance of 'test_object1'
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');And so on for the other collection
    You don't need the procedure (as my sample code shows) but once you populate the variables properly it will work.

  • PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    http://kb.mozillazine.org/Recovering_deleted_mail_accounts

  • 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 add a single check box and a label to a image in Muse?

    Hello!
    I need help with adding a check box with a label to the right of it. I know about the forms, and how you can add a check box there but i don't need all the other form options.

    Hi
    It is not possible to use only checkbox from a form at the moment. An alternate way could be inserting it using html, something like below
    <input type="checkbox" name="Muse" value="Muse"> A sample checkbox<br>
    I am not sure what exactly you are trying to achieve, but this will work  with Form tag only, like in the example here
    Tryit Editor v2.5
    Do let me know if you have any question.

  • How to enter values in Descriptive flexfield by WEB ADI

    Hi All,
    I am using GL-Journals as an integrator for uploading data using WEB ADI. I have DFF at Journal lines. There is Context Field value and also 3 lines(Attributes). I can enter the data by clicking the Line DFF Context and Line DFF manually. The entered values are shown as concatenated values in this cell. But the data is in different columns in excel file. I want to map the data from excel(which is in different cells) to this one column in the WEB ADI template.
    Does any one know how to map this.
    Thanks in advance.
    Regards,
    Pramod.

    Hi All,
    After couple of investigations, I understood that it is not possible to map and upload DFF Values unless you concatenate the data. We all know it used to work in client ADI. I have found these documents 1072689.1 and Bug 8469705.
    If someone knows any workaround please let me know.
    Thank you,
    Regards,
    Pramod

  • How to enter values in ztable from screen painter

    Hi guys,
    I have a scenario,where i have to enter values in ztable for the values entered in  screen painter.The screen painter is supposedly having 10 columns. i enter the value in the grid(table) and when i save, the records have to be inserted into ztable created by me. how to go through the problem. kindly help in  giving a flow for the problem .If anybody has gone through this scenario please help out.
    Thankx in advance
    Regards
    Navin

    if ur entering one record at a time from sreen to table then
    u have to use ,
    in pai module of the screen u have to code,
    case sy-ucomm.
    when 'SAVE'.
    ztable-roll = ztable-roll.
    ztable-name = ztable-name.
    insert ztable/modify ztable.
    ENDCASE.
    if ur screen is having a table control
    then u have to create a loop inside a module.
    like
    loop at tabcontrol_name
    module insert_data.
    endloop.
    and in the doubleclked module,
    move-corresponding ztable to ztable.
    insert ztable.
    Note : in both cases u have selected input fields as from
    table/dictionary in the screen.
    Regards

  • How to enter values for newly inserted field for maintenace view table

    Hi ,
    I have inserted new field for custom table which consits of maintance view..
    I want to put some values in to this newly inserted field..
    When i try to insert values bu useing se16,iam unable to view this newely inserted field..
    Can you please let me know how can i insert values to this newely created field
    Thanx,
    Parnith

    Hi Parnith,
    It is easy to use a table maintainance to enter values to a database table....
    if you have a table maintainace generator and you are not able to see the newly added field here is the reason
    Everytime you add a new field , the table maintainance needs to be regenerated..The reason is that the screen you are using in the table maintainance is created within a program with respect to the fucntion group and not directly linked to the table..whenever you change the table,the function group is not affected and changes are not reflected in the table maintainance , so you have to regenerate by utilities-> table maintainance generator in sell for that table..once you do it , the function group assigned to the table automatically creates a new one with the latest fields added
    Reward if helpful
    Regards
    Byju

Maybe you are looking for

  • Wrong index being chosen-start routine slow

    Hi, We are uploading 6Million odd records using lookup and aggregation in the start routine of update rules from an ODS into an infocube. One such lookup is on the source ODS itself and takes the longest. The WHERE clause of the SELECT exactly matche

  • Another wireless printing problem

    I have 2 macs, one on Mountain Lion and the other on Leopard.  I am unable to get them to print wirelessly through my Epson PX710W All in one. The Epson chat line has so far been unable to help. On the Leopard 'print and fax' , my printer is listed b

  • Procedure for Output types

    Hi Gurus, Can any one please tell me the complete procedure for  configuring output type. Requiremnt is I have to configure a o/p type for  Order Confirmation  &  Invoice. regards, Ajoy

  • Automatic Source Determination

    Hello, I have implemented function module exit EXIT_SAPLMEREQ_005 of enhancement MEREQ001 to control user input, one of which is the desired vendor field. Under standard system conditions, if the user enters a desired vendor then automatic source det

  • Geotagging and photoshop elements 9

    I used to work with photoshop elements 5 (english edition) since 5 years and i happily geotagged all my image database ( >20k images). Now i upgraded to PE 9 (italian edition) and geotagging seems to be disappeared. It is true or can't find it ? And