MYSQL Array Assigned to Swing Control

I am having a hard time figuring out, how I assign data from an array to a swing object such as a "scroll pane". Below is my query and I see how to assign an individual value to a scroll pane, but how would I assign all the values from my query to the scroll pane and put each value on a different line?
statement s2 = conn.createStatement ();
               s2.executeQuery ("SELECT stuff FROM  mydatabase");
               ResultSet rs2 = s2.getResultSet ();
               int count2 = 0;
               while (rs2.next ())
                   String stuffVal = rs2.getString ("stuff");
               ++count2;
stuffscrollbox.setText ( "$" + stuffVal);Edited by: crusherdestroyer on Jan 18, 2010 1:58 PM

hii,
I can not hepl you, cos I never used these JComponents, but maybe here is your "result"
[http://java.sun.com/docs/books/tutorial/uiswing/components/textarea.html]
or
[http://www.java2s.com/Code/Java/Swing-JFC/CatalogSwing-JFC.htm]
... kopik

Similar Messages

  • How to declare and initialize a STRING ARRAY (assign strings to array elements)

    How to declare and initialize a STRING ARRAY (assign desired strings to elements of an array, for example "abc", "def", "ghi", "jkl", etc.) in LabVIEW? I saw a "string array" block in help, but could not find it in the function palette. Does a spreadsheet string have to be in a file (or can it be in a string constant block)? Thank you.

    Hi,
    you can do it in several ways:
    1. Direct way: Create string array control on front panel and type strings in its elements
    2. Programmatically 1: Create string array indicator (or local variable of control), right click on it in block diagram, select "Create constant" from drop down menu. The array constant will appear. Now type values in this constant's strings
    3. Programmatically 1: Use "Build array", "Replace array subset", "Insert into array" or "Initialize array" functions from "Functions->Array" palette.
    And of course you can combine all of these methods.
    Good luck.
    Oleg Chutko.

  • Assign COIN to control area

    Dear All,
    I am trying to posting an incoming invoice. But the error pops up as below:
    After doing some research, i should set the COIN range and assign COIN to control Area.
    Can anyone provide me detail steps to solve this issue? Very appreciated!

    Hi Wang,
    Go to tcode KANK, give your controlling area P610, click on maintain groups(F6) button.  Now you can see the maintain number range groups screen, in that screen select COIN(double click or keep cursor on COIN and press F2 button or select element button) from not assigned group and select number range for controlling area button(here you have to click on check box) and then click on Assign Element/Group(F5) button and click on save button.  Now you can see COIN in number range for controlling area P610.
    This is enough to solve your problem.
    Please revert if not yet solved your problem.
    Regards,
    Singaiah Pathuri(Singh)

  • How to assign a calendar control to a manually created Textbox in htm file

    Hi Expert,
    I have created a Textbox manually in a xxxx.htm page. Now i want to assign a calender control to it how to achieve it in web UI.
    If i select the calender popup value the date should appear in my Textbox. Pls help.
    Regards,
    Chella.

    Please, the first thing to do when you create a discussion is to provide the version of the tools you use ;D
    Francois

  • Can I use Swing controls with Forms 9i?

    Is there a way to use Java Swing controls with Forms 9i via a PJC or something? If so, is there a white paper on it? Thanks.

    Yes you can. There is a quick start about PJC here:
    http://otn-stage.us.oracle.com/products/forms/htdocs/upgrade/pjc/content.html
    And there is also a paper about Forms in the Java World that you should read.
    http://otn.oracle.com/products/forms/pdf/forms_in_java_world.pdf
    You might want to have a look at the Oracle9i Forms Demos for some code samples as well.

  • Can we assign 1 credit control for multiple company codes

    hi,
    sap gurus,
    good afternoon to all
    can we assign 1 credit control area for multiple company codes.
    if yes can any body explain the pro's and cons of the assignment.
    if no can any body explain the why?
    its urgent plz.......
    regards,
    balaji.t
    09990019711

    Yes Balaji,
    We can assign.
    Here the risk categiry and terms of one credit control area will be applicable to all company code.
    Credit Control Area
    Definition
    An organizational unit that represents the area where customer credit is awarded and monitored.
    This organizational unit can either be a single or several company codes, if credit control is
    performed across several company codes. One credit control area contains credit control
    information for each customer.
    Use
    Credit and risk management takes place in the credit control area. According to your corporate
    requirements, you can implement credit management that is centralized, decentralized, or
    somewhere in between.
    For example, if your credit management is centralized, you can define one credit control
    area for all of your company codes.
    If, on the other hand, your credit policy requires decentralized credit management, you
    can define credit control areas for each company code or each group of company codes.
    Credit limits and credit exposure are managed at both credit control area and customer level.
    You set up credit control areas and other data related to credit management in Customizing for
    Financial Accounting. For more information, see the Implementation Guide under Enterprise
    Structure   Definition or   Assignment   Financial Accounting and then Maintain credit control
    area. You assign customers to specific credit control areas and specify the appropriate credit
    limits in the customer master record.
    Thanks,
    Raja

  • Can we assign 2 credit control area for one company codes

    hi,
    sap gurus,
    can we assign 2 credit control areas to one company codes ?
    yes we can.
    but
    what is the impact of that
    can any one analyse.
    regards,
    balaji.t
    09990019711

    Hi,
    we can have multiple credit control areas based on req-
    eg: client wants to restrict customer based on divisoin wise.
    then we will maintain credit control area based on sales area
    there 3 division in a comp: AA -BB - CC
    thens sales areas will be:
    1000-10 -AA
    1000-10-BB
    1000-10-CC ( assuming therez one sales org-1000 & dc 10)
    now create 3 cr control areas- OB45
    Assign sales area to cr Control area - OVFL
    Assign permitted credit control areas to comp code - IMG- FA- AR&AP- Credit Management- Credit control account - Assign permitted credit control areas to comp code.
    Now you can assign this Cr CA- by sales area wise in CMR & maintain the credit limits for each Cr CA.
    So when ever your needs wants to do it by division or sales area wise you can do this.
    Thanks,
    Raja

  • Assignment to a controlling object

    Is there a setting you can do to a IDoc to accept the profitablity segment.  For example when i try to debit an account which has a cost element 12 (sales deduction) attached to it, it doesnt post it asking Assignment to a controlling object.  COPA is active in my case.  How can I get the idoc to post automatically by accepting the profitability segment.
    Please help
    Thanks
    Pearina

    Hi,
    To check/ Maintain CO Object for an Account...
    Go to: FS00
    Enter G/L A/c: 41100055 and Company Code,
    and click Tab: Edit Cost Element.
    Maintain Valid from and Valid to
    And Click tab: Master Data.
    In Tab: Basic Data--> CElem category
    Go to Next Tab: Default Acct Assignment-->Cost Center.
    And Save.
    Please revert for futher clarification, if any.
    Best Regards,
    Amit.
    Rewards, if helpful.

  • No credit segment assigned to credit control area

    Hi experts,
    Do you know why the error below is  displyed `when I´m created a sales order..?
    No credit segment assigned to credit control area
    Thanks in advance

    Hi,
    Some of financial supply chain management parameters are active in your system that is why this type of error is appearing
    Define segments and assign to credit control area
    IMG >> Financial supply chain management >> credit management >> Integration with Account receivable and sales and distribution >> integration with sales and distribution
    Here define segment and next assign it to crdit control area.
    Kapil

  • Tutorial on AWT/Swing control flow

    Greetings all,
    Just wondering if any of you folks know of a good tutorial on AWT/Swing control flow? I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...weird stuff happening with loss of focus when the other windows come out, etc etc etc.
    I have it working via a series of what I consider kludges, but I would really like to implement it cleanly, and it's looking like that's going to require understanding <ugh> <grin>
    So it looks like it's time that I bit the bullet and got to grips with control flow in AWT/Swing. Is there a tutorial out there that could help me with this?
    Many TIA

    skiaddict1 wrote:
    Let's take your word for it, but if you have the slightest doubt please consider the subject: EDT violation is a classic here.OK sure, but I really don't think I'm violating it. I avoid multi-threading like the plague, and only introduced it for my report writer because I wanted to have a little window advising the user that the report was in the process of being written.Raise your left hand and swear this report writer is not running when you experience the problem you describe! >o(
    OK, this is just kidding, as per the rest of your description, it sounds reasonable now to assume that your problem is not related to EDT violation.
    I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...This summary is a bit worrying, and I thought you would mention problems in the display of the table being edited. But you seem to refer to problems in other windows, or did I misunderstand?
    Or do you mean, loss of focus in the editor still being edited? Can you please clarify what you do and what your problems are?
    In particular, what does the other windows come out mean?OK, I was trying to be sparse with details because I didn't think they were relevant.Actually the worrying seems all the more justified, now that you have described it more extensively: I was afraid that you would raise other windows while editing, and that's the case. I know little of focus though...
    I have a table in window A, one of whose columns has a custom editor which, when a cell in the column is double-clicked, registers itself with window B as a choice-listener (see later) then asks window B to come to the front. Window B, when the user performs a choice amongst the UI elements in there, fires a choice-event to its listener, i.e. the custom editor. At which point the editor saves away the chosen value (for use by getCellEditorValue()), sets the text in the cell appropriately, turns edit mode off via fireEditStopped(), and brings window A back to the front.
    (...) once the custom editor asks window B to come to the front, the table in window A loses focus and when it is brought back to the front, the table's JScrollPane seems to have the focus (visually, it has the focus rectangle around it). Pressing the Tab key has no effect on focus; you have to use the mouse to focus something.I assume you have read the tutorial on using tables in Swing.
    It contains an example where a custom editor is bringing up a dialog: http://download.oracle.com/javase/tutorial/uiswing/components/table.html#editor
    AFAIK, the example does not suffer from focus problems.
    What I am finding, and I reiterate this is new since I rewrote the windowing subsystem for the app (the custom editor was not changed in the rewrite), is that (...)Just what do you call "rewriting the windowing system" (just to rule out the possibility of something Ramboesque)?
    I have no idea why this loss of focus is occurring, and I am at a loss to begin to figure it out. As I wrote above, I have a series of kludges which gets around the symptoms, but I would really rather figure it out and fix it.OK I admit I cannot tell what happens exactly, but:
    1) instead of bringing window B to front, couldn't the editor bring up a dialog B (e.g. using JOptionPane.showXxxDialog() to bring up just the choice panel? The advantage is that it is more "synchronous", you can control when the window A's table model is updated.
    2) what worries me too is that you update the model of the table being edited while you're editing one cell of it? Would it be possible, and make sense in your case, to update this model later (that is, post the model update as an invokeLater(...) call)? I don't see how seeing the table updating underneath helps the user editing its cell, but you may have your reasons.
    What do you call flow control , or control flow in AWT/Swing?Basically, what I am after is something that will help me begin to understand/diagnose problems such as the above when they happen in my code. I am deeply averse to multi-threading (...) Things in my code were working, and that was enough for me.
    But the above behaviour, and another weird behaviour I was having last week, which again I have solved with what I consider a kludge, and again which only began with my new windowing subsystem, have caused me to realise that it's time I really got to grips with this issue.Yes, when they say beware of threads when using Swing , nobody tells to not use threads! Just to be aware of how special Swing is with regards to threads (at least, compared to AWT, that didn't make such warning).
    I would like, for example, to really deep-down understand exactly when listeners for AWT-Swing events get called. I don't really care so much when the events get put on the queue, but I do care when exactly my event handlers will be called. This will help me diagnose problems, I'm sure.Well they get called in the EDT, by some framework code that, in an infinite loop, does something along the lines of:
    - pop next event from the event queue
    - determine which is the target widget
    - let the widget transform the event and send it to all registered listeners
    Now with dialogs, things gets dimmer, because while a dialog is brought up (via a<tt>setVisible(true)</TT> call on the EDT, the EDT is indeed suspended, and a new event thread manages the events for the dialog).
    I'm sorry I have no reference for that behavior, and my description is certainly blurry (and possibly wrong), but I don't think your problem is so much related to threading as I initially thought.
    N.B.: Darryl's second link does features sequence diagrams that try to demonstrate what happen (in a specific example with asynchronous access, but you can derive the simpler, regular, working, from it).OK, yes I saw that diagram, I was offput by the asynchronicity but I will have another look tomorrow also. Thanks againDon't put too much hopes in there, indeed it's definitely not the kind of info I understand you're looking after.
    Much luck all the same, and feel free to come back with your findings, or with more questions, about the initial subject (reference on event flow) and the specific problem (your focus issues with the editor).
    I also cannot end this message without suggesting that you try to reproduce the problem with an SSCCE (http://sscce.org), that you could post here for us to try out. See this recent discussion about the multiple interests of this approach: {message:id=9587964}
    Best regards,
    J.

  • Dynamically changing elements in an array of menu ring controls

    I have an array (32 rows, 5 columns) of menu ring controls.  When a menu selection is made in the first column of any given row, the contents of the menu ring for the subsequent columns (same row) may change.  If this is possible, how would you do it?  Thanks.
    Solved!
    Go to Solution.

    jschichl wrote:
    For example, if I had a menu ring of 1,2,3,4.  I want to write some logic that says when 4 is selected, then menu ring in the next row changes to 5,6,7,8.
    A ring is just a number as far as LabVIEW is concerned, so the underlying cluster need only store numbers, not rings.
    In the example I posted in a linked thread, where controls are moved around on top of a table, you need only one ring control. Each time you show that ring, you can assign a new set of strings and values to it, using the Strings and Values property. You can decide what set of strings to show based on the existing data in the cluster, which will get updated each time you change the value in a cell of the table. Does that make sense? I don't have time right now to put together a more detailed example than what I've already uploaded in other threads, and it's only a small change to that.
    You update the menu ring at the time the user wants to select a value from it, not at the time the user changes the value that determines what set of menu items to show.

  • Associative Array Assignment

    I have an associative array that is built on a record.
    TYPE LKey IS RECORD (
    lock_key locks.lock_key%TYPE,
    category_id_cd locks.category_id_cd%TYPE);
    TYPE LockKeys_t IS TABLE OF LKey
    INDEX BY PLS_INTEGER;
    v_LockKeys_arr LockKeys_t;
    How do I populate the elements of this array one row at a time within my cursor FOR loop? I just want to do something like this:
    SELECT v_lock_key, v_category_id_cd INTO v_LockKeys_arr FROM dual;
    When I try this I get : "expression v_LockKeys_arr in the INTO list is of wrong type."
    Then I will loop through the array and use each element one at a time:
    FOR j IN 1..v_LockKeys_arr.COUNT
    LOOP
    ReleaseLocks( v_LockKeys_arr(j).lock_key||'2:',
    v_Lockkeys_arr(j).category_id_cd,
    i_User, v_release_set );
    END LOOP;
    Thank you in advance for your time.

    DECLARE--CREATE RECORD
    TYPE CUSTOMER_RECORD IS RECORD (CUSTOMER_ACCT_ID NUMBER,
    CUSTOMER_NAME VARCHAR2(2000));
    --CREATE TABLE OF RECORD TYPE
    TYPE CUSTOMER_REC IS TABLE OF
    CUSTOMER_RECORD
    INDEX BY BINARY_INTEGER;
    --INSTANCE OF RECORD
    LREC_CUSTOMER_RECORD CUSTOMER_RECORD;
    --INSTANCE OF TABLE
    LT_CUSTOMER_REC CUSTOMER_REC;
    BEGIN
    --ASSIGN VALUES TO INSTANCE OF RECORD
    LREC_CUSTOMER_RECORD.CUSTOMER_ACCT_ID:=10;
    LREC_CUSTOMER_RECORD.CUSTOMER_NAME:='BHAGAT';
    --INSERT INTO TABLE, VALUES FROM RECORD INSTANCE
    LT_CUSTOMER_REC(1):=LREC_CUSTOMER_RECORD;
    --OUTPUT
    DBMS_OUTPUT.PUT_LINE(LT_CUSTOMER_REC(1).CUSTOMER_ACCT_ID);
    DBMS_OUTPUT.PUT_LINE(LT_CUSTOMER_REC(1).CUSTOMER_NAME);
    END;
    /

  • Business rule assignment in Process Control 10.0, does not show any Control

    Hi All,
    I have created Organization, and assigned Mitigation control, as shown below. I have also created data Source and Business rule. But Business rule assignment is Blank for Controls. So, could you suggest, how can i see the Controls for the Business rule
    Regards
    Plaban

    You'll need to ensure the timeframes are aligned. What is the valid from date of your organisation and equally so important from your (sub)proces and your control. You are trying to do an assignment as per the first of january 2015. You'll not find entities that are created after Jan 1 2015.
    Furthermore you can only select controls that are either earmarked to be tested automated or semi-automated.
    Finally you're refering to mitigating controls. So that would imply you have integrated the AC mitigating controls with PC or vice versa. What is the creation date of the mitigating control and per which date has it been assigned to the local subprocess?
    In order to provide a precise answer we'd need more details on the exact process you've follow. There are simply more than on possible root causes depending on what you've done.
    Hope this helps.
    Cheers,
    Jan

  • Assigning plant to controlling area

    Dear Gurus,
    Got this error message while doing Individual Purchase Order.
    " Your Plant is not assigned to controlling area"
    Here I have created controlling area and assigned to the company code but could not find where i have to assign it to a Plant?
    Hope Gurus can solve this for me.
    Regards

    Hi Venkat
    I think it is referring to Purchasing Organization.  Check in <b>OX17</b> whether you have created and assigned your Purchasing Organization to Plant. If not, assign it and try once again.
    Thanks
    G. Lakshmipathi

  • Array Assignment Not Working

    Can anyne give me a hint / solution as to why my primative array values are not being set/assigned in the following code. All the rest of the code seems to be in order - yes I have the arrays being initilized prior to this code to a known value. THANK YOU . . .
    do
    day = myInBox.getInteger("Enter in the Day of the Month in integer / digits: ");
    response1 = responseBox.prompt("Do you have a Low Temp to enter? ");
    if (response1 == ResponseBox.YES)
    loTemp = myInBox.getInteger("Enter in the LOW temp for the previously entered day: ");
    loTemp = (loArray[day]);
    response2 = responseBox2.prompt("Do you have a HIGH temp to enter? ");
    if (response2 == ResponseBox.YES)
    hiTemp = myInBox.getInteger("Enter in the HIGH temp for the previously entered day: ");
    hiTemp = (hiArray[day]);
    loTemp = (loArray[day]);
    hiTemp = (hiArray[day]);
    response = responseBox.prompt("Do you have additional daily temps to enter? ");
    while ( response == responseBox.YES );
    //loTemp = loArray[day];
    //hiTemp = hiArray[day];
    displayMatrix(loArray, hiArray);

    Can anyne give me a hint / solution as to why my
    primative array values are not being set/assigned in
    the following code.I don't see any assignments TO your arrays in the code you posted; all I see is code attempting to pull values FROM them.
    loTemp = myInBox.getInteger("Enter in the LOW temp for the previously entered day: ");
    loTemp = (loArray[day]);Did you mean:
    loArray[day] = loTemp;
    ?

Maybe you are looking for

  • Need help Installing OID Repository on existing database server using RepCA

    I have an oracle database server running 10g (10.2.0.4) and I want to install metadata repository on it. I downloaded the Application Server Metadata Repository Creation Assistant 10.1.2.0.1 (standard edition). I find that there are no batch files in

  • How do I add a folder of pdf files to itunes?

    Hi. I am preparing for my Ipad arriving next week. I have over 500 pdf files arranged in folders. I am trying to add them to my itunes library so as to sync to Ibooks but when I try adding a folder, nothing happens. I can add the files individually b

  • IPhoto 6.06 calendar - putting pic on days.....

    When I put a picture on specific days of the calendar, I have to manipulate the photo by clicking it and saying "send to back" so the words on the calendar page are shown over the photo. I can do this and then even print the calendar page fine. when

  • Incorrect Amount displayed in MIRO when ref of  bill of lading

    hi when i enter an MIRO with refrence to a bill of lading, the amount that being populated is different to the amount in shipping cost document

  • WUC-15 [FileFunctions.fopen()]

    hi all i run forms 10g R2 on windows xp and using webutil and it run normally with all functions except when i deal with files when i call fopen like OUT_FILE := CLIENT_TEXT_IO.Fopen(:FILE_NAME,'w'); the file created but i got ora error ora-302000 an