How to display most updated data on the TOP of the JTextArea???

hi ,
i have a JTextArea inside a JTextPane
and the usual way that JTextArea is display
The 1st message on top and follow until the ends
is there any way to display the most updated/newest data on TOP instead Of the normal way?

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TextTop extends JFrame {
    public TextTop() {
        initComponents();
    private void initComponents() {
        jTextArea1 = new JTextArea();
        jToolBar1 = new JToolBar();
        jButton1 = new JButton();
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        jTextArea1.setBackground(new Color(255, 255, 204));
        jTextArea1.setEditable(false);
        getContentPane().add(jTextArea1, BorderLayout.CENTER);
        jToolBar1.setFloatable(false);
        jButton1.setText("TEXT");
        jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                jButton1ActionPerformed(evt);
        jToolBar1.add(jButton1);
        getContentPane().add(jToolBar1, BorderLayout.NORTH);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-409)/2, (screenSize.height-334)/2, 409, 334);
    int count;
    private void jButton1ActionPerformed(ActionEvent evt) {
        count++;
        jTextArea1.insert("Text  " +count+ "\n", 0);
    public static void main(String args[]) {
                new TextTop().setVisible(true);
    private JButton jButton1;
    private JTextArea jTextArea1;
    private JToolBar jToolBar1;
}

Similar Messages

  • How to determine most recent date from the date column of internal table

    Dear friends
    would you like to tell me. how i determine the most recently changed record by looking at date and time from internal table i am not supposed to sort the table by date and time... I must check date and time with other records date and time to determine which record is most recently changed...
    here the scenario is.
    id idnumber chdate chtime
    1 123456 20060606 135312
    2 123456 20060606 135900
    3 123456 20060606 132300
    4 123457 20060606 140000
    5 123457 20060606 142500
    in the above scenario i must keep in my mind that the most recently changed record is identical to its idnumber i can say that:
    the record should be fetched this way
    id idnumber chdate chtime
    3 123456 20060606 132300
    5 123457 20060606 142500
    because here the id 3 is the most recently changed in the idnumber 123456
    where id 5 is the most recently changed in the idnumber 123457
    please help me to determin how i am supposed to carry out this task any suggestion, code will be great help of mine.
    regards
    Naim

    After testing my suggestion above, I realized that it doesn't work because the delete adjacent actually will keep the first one and delete the rest.  I'm working with Srinivas's code a bit now,  I think it is almost what you want.  I am under the impression that you dont' want to HIGHest date/time, but just the last record of the sequence, if this is the case, then this code will help.  Here we will assign an index to each record per the idnumber, that way we can sort it and get the lastest record.
    report zrich_0001.
    types: begin of itab_type,
            id       type i,
            idnumber type i,
            chdate   like sy-datum,
            chtime   like sy-uzeit.
    types: end of itab_type.
    types: begin of itab_type2,
            id       type i,
            idnumber type i,
            index    type i,
            chdate   like sy-datum,
            chtime   like sy-uzeit.
    types: end of itab_type2.
    data: itab     type table of itab_type with header line,
          itab2    type table of itab_type2 with header line,
          prev_rec type itab_type.
    data: v_id type i.
    start-of-selection.
      itab-id       = 1.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '135312'.
      append itab. clear itab.
      itab-id       = 2.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '135900'.
      append itab. clear itab.
      itab-id       = 3.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '142500'.
      append itab. clear itab.
      itab-id       = 4.
      itab-idnumber = 123457.
      itab-chdate   = '20060606'.
      itab-chtime   = '140000'.
      append itab. clear itab.
      itab-id       = 5.
      itab-idnumber = 123457.
      itab-chdate   = '20060606'.
      itab-chtime   = '120000'.
      append itab.
      clear itab.
    <b>  data: counter type i.
    * Assign an index to each row per idnumber
      loop at itab.
        on change of itab-idnumber.
        if sy-tabix > 1.
          clear counter.
          endif.
        endon.
        clear itab2.
        move-corresponding itab to itab2.
        counter = counter + 1.
        itab2-index = counter.
        append itab2.
      endloop.
    * Sort it and get rid of older records.
      sort itab2  by idnumber ascending
                     index descending.
      delete adjacent duplicates from itab2 comparing idnumber.</b>
      read table itab2 with key idnumber = '123456'.
      write:/ itab2-chdate, itab2-chtime.
      read table itab2 with key idnumber = '123457'.
      write:/ itab2-chdate, itab2-chtime.
    Regards,
    Rich Heilman

  • How to display current system Date in the Date Input field ?

    Hi,
    I am having a Date Input field( binded to Data type). On load, i would like to display the current system date filled in that input field.
    How do i achieve this ?
    Reg/Venkat

    Hi Venkatesan,
    In your view in your init() method add the following code:
    wdContext.currentContextElement().setOrderDate(new Date(System.currentTimeMillis()));
    this is if your Date-attribute is in the root of the context.
    else you have to set the date in the node where the date-attribute is present with:
    IYOURNODEElement node = wdContext.createYOURNODEElement();
    node.setOrderDate(new Date(System.currentTimeMillis()));
    regards,
    Björn

  • How to display 16 weeks data in the output of the query

    Hi experts,
    I have to display 16 weeks data from current week(Thursday to wednesday).
               (19/07/07 - 12/07/07) (11/07/07 - 6/07/07) like these 16 weeks
                             sales                       sales
    product1              200                         300
    product2              400                         500
    I have to use text variable on createddate char but I do not know how to implement
    the above scenerio.
    Guru's please help me.
    Thanks & Regards,
    James.

    sure james ..
    chk these links..
    text var..
    http://help.sap.com/saphelp_nw04s/helpdata/en/85/e0c73cccbdd45be10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/c1/759b3c4d4d8d15e10000000a114084/frameset.htm
    chk thisthread too..
    Re: Problem with the text variable
    and for replacement paths..
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    hope it helps...

  • How to display ETL run date in the title view of any report.

    Hello Expert,
    I have a requirment to show the ETL run date in the title of the report.
    Eg: " Sales Vs target Report : Data loaded as on date: <ETL run date>.
    The ETL run date is coming in the fact table.
    I am working on the OBIEE 11.1.1.5. So pla help if it is possibe.
    Thanks in Advance.
    Niraj

    Thanks for response.
    I tried to do the same. but unable to achieve. I did the following,
    1. Created a init block with SQL which extract the value of ETL rundate ans associate with a repository variable (ETL_RUN_DATE). This init block was retriving the data.
    I put the folowing in the Title as well as sub title view:
    Data loaded as on date: (@{biServer.variables[ETL_RUN_DATE]})
    I also tried to put Data loaded as on date: @{repository.ETL_RUN_DATE} this also didnot worked.
    So could you please provide me the steps with actual syntax, then it willbe very much helpful for me.
    Thanks
    Niraj

  • How to display all PO data in the PDF form?

    Hi,experts,
    I create a WDJ application with the PDF form for print all PO sheet.
    I can transfer all data from WDJ to PDF form.
    I need continuous print all PO sheet that include header and items.
    After I run the application, I found only the one PO header and one items in the PDF FORM.
    I think the config of the adobe form is error.
    The version of the adobe livecycle designer is 7.1.
    Do you give me some hint?
    Best regards,
    tao

    Hi, Chintan,
    Thanks a lot for your reply so quickly.
    I have check the config of the "Repeat Row for each item" according your word.
    I change the checkbox of the "Repeat Row for each item" for the PO items, and the PO items is ok after I run the application.
    But the pdf is only one PO sheet, not all PO sheet.
    I found the  checkbox of the "Repeat Row for each item" is unabled in the HEADER subform. I think it is the cause for the problem.
    But I don't know how to enable the  HEADER subform because the check box of the "Repeat Row for each item" is unable in the subform of the header.
    Do you give me some hint? Thanks a lot for your help!!!!!
    Best regards,
    tao

  • How do I get routing data from the Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application.

    I have a tableView displaying a list of contacts from a Cloud Database.  After selecting a contact, I push to a programmatically created MKMapView.  Then I display the initial region (the view) that includes the users current location (starting point) and their selected destination (end point).
    Now I want to display annotations (as described in the Location Awareness Programming Guide) that displays polylines which will represent the turn-by-turn navigation IN MY OWN APPLICATION, and not in the Map App currently used in IOS6. 
    Due to licensing and its becoming depricated in IOS 6, I do not want to get routing data from the Google Maps API.  How do I get routing data from the IOS 6 Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application?
    I checked out Stack Overflow and other forums which basically left me with the impression that this is not possible. I also checked out the TomTom iPhone Mobile SDK User Guide from the TomTom Developer Portal and am still confused.  It must be possible to retrieve routes, since the Map App can display turn-by-turn directions.  How can I retrieve turn-by-turn data that I may display as a route within my own application?

    Thanks Michael. Apologies for the slow reply I was away for a bit (holiday blitz at work and visiting family madness etc.etc.) back now, I set both options you requested to "never " and retried the CMS software with no change. 
    I do have progress of a sort though, as a test I took a separate test PC and put a clean install of Win7 on and loaded up the CMS software (it worked perfectly) and then took the version of ole32.dll off that machine and put it onto the computer I had built
    for her (using Linux) and...
    got a new error code. Darn I was so sure I had found a clever solution this time lol.
    Anyway now when the CMS fails it gives me a similar error but the offending module is "ntdll.dll" sooo... I tried taking the "working" version of ntdll.dll from the test box and moving it over (making sure to back up the existing ones
    first so I could put them back if needed) to her new PC and the PC would not boot. 
    It seems to want the original versions of a few Dynamic Link Libraries and if I could somehow give it those while not breaking Win7 it should theoretically work seeing as it no longer errors with ole32.dll. 
    ntdll.dll however seems necessary for Win7 to boot.
    So what I am wondering now is:
    Is there some way to have both versions of the DLL file in the system32 folder (bypassing the "cannot have two files with the exact same name in the same folder" thing) or rename the original DLL's something else and somehow make the CMS look for
    the new named versions so the system has the updated DLL's it needs to boot/run and the CMS has the old ones it wants to run or is there someway to have a self contained install of the CMS, say on a USB flash drive and give it it's own E:/windows/system32/needed
    dll's  path to the files it needs? 
    Willing to try any other options or settings you may have come up with as well.
    Thanks again for your reply and my apologies for not answering sooner.

  • How to display planned movement date and actual movement date together?

    Hi, Professionals,
    My purpose is to list delayed outbound deliveries.
    Anyone could tell me how to display planned movement date and actual movement date?
    Appreciate your help.

    Thanks Shiva.
    I tried another way to do it. It works only for a short period of time.
    By using VL06O, I list all outbound deliveries by limiting both planned goods movement dates and actual goods movements dates to the same week I would like to inspect. Say both from 7th/11 to 14th/11.
    then I list outbound delivery list with planned goods movement date to 7th/11 but left out actual goods movements dates this time.
    In excel, I compare those two lists and filter out those unique ones because those unique documents means delayed deliveries which cannot delivery according to planned date.
    However, the "delayed" list generated by this method has some noises. Not all of documents are really delayed although most of them do.
    I'm also looking for a way to list sales documents number of these delayed delivery documents so i can retrieve order details from it such as order value.
    Help still needed.

  • How can I save my data and the date,the time into the same file when I run this VI at different times?

    I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
    2/12/03 16:04 13567
    2/13/03 10:15 35678
    So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.

    evolution wrote in message news:<[email protected]>...
    > How can I save my data and the date,the time into the same file when
    > I run this VI at different times?
    >
    > I use a translation stage for the experiment.For each user in the lab
    > the stage position (to start an experiment) is different.I defined one
    > end of the stage as zero. I want to save the position , date and time
    > of the stage with respect to zero.I want all these in one file, nd
    > everytime I run it it should save to the same file, like this:
    > 2/12/03 16:04 13567
    > 2/13/03 10:15 35678
    >
    > So I will track the position from day to day.If naybody helps, I
    > appreciate it.Thanks.
    Hi,
    I know the function "write to spreadsheet file.vi"
    can append the data
    to file. You can use the "concatenate strings" to display the date,
    time as well as data... Hope this help.
    Regards,
    celery

  • Updating data in the database table

    Can any help me in the code for updating data in the database table.
    Regards,
    Rahul

    Hi Rahul,
    A slightly longer procedure that i'm adding here...
    1.) Create the component (i'm sure you have this covered)
    2.) Next on the button click that updates the database - add an action.
    3.) double click the action so that you are taken to the methods section of the view.
    4.) next you need to add the code that is required the update the database - this will be in the form of the above two posts.
    5.) compile and test the application
    Let me know in case you need further information on how to do this with a function module or something.
    Thanks.

  • How to display multi-channel image in the 'proxy'?

    There're many examples to show how to display composite channels in the 'proxy'. But I don't find any example to show how to display multi-channel image in the 'proxy'. I found that I can use PSPixelOverlay to display alpha channel data like this:
    int nSpotChannel = gChannelCount - 4;
    PSPixelOverlay* overlay = new PSPixelOverlay[nSpotChannel];
    for(int i = 0; i < nSpotChannel; i++){
           if( i != (nSpotChannel - 1) )
                 overlay[i].next = overlay + i + 1;
           else
           overlay[i].next = NULL;
           overlay[i].data = gChannelData + (4 + i) * nPlaneBytes;
           overlay[i].rowBytes = gProxyRect.Width() * gDocDesc->depth / 8;
           overlay[i].colBytes = 1;
           overlay[i].r  = 230;
           overlay[i].g = 161;
           overlay[i].b = 174;
           overlay[i].opacity = 255;
           overlay[i].overlayAlgorithm = kStandardAlphaOverlay;
    pixels.pixelOverlays = overlay;
    Then, Seeing red part, it will trigger a new problem, that is how to get the color value of the alpha channel by plung-in itself? It seems that no channel color value info is in FilterRecord.
    If you have other solution, please tell me. Many thanks!

    This is what I've been doing - was just curious if there was a way to see a more cohesive image.
    If the individual EQ plugins are in fact the answer, is there any way to smooth how the Analyzer displays? The image I posted above, all of the tonal curves are very smooth. The analyzer tool shows a lot of peaks and valleys within the overall curve and it's hard to pinpoint each instrument's "sweet spot." Vocals for example are very hard to spot.
    - Morgan

  • How to display properties of dimension on the input form and report in bpc

    Dear Expert,
    Please tell me how to display properties of dimension on the input form and report in bpc. I can only display dimension number.
    thanks so much
    hungth

    Hi Hungh,
    If your are using BPC 10 with EPM add in client, you can use the function:
    EPMDimensionProperty ()
    This function retrieves the properties of a specified dimension in a specified cell range.
    Thanks, Safa

  • I unfortunately just got my IPhone 4s stolen.I thought I had the find my iPhone enabled but I didn't because I cannot locate the phone when I sign in ICloud.How can I erase all data on the phone so the thief can't access my personal information.

    I unfortunately just got my IPhone 4s stolen.I thought I had the find my iPhone enabled but I didn't because I cannot locate the phone when I sign in ICloud.I have a password on the phone but i'm not sure if I turned on the option where the phone resets if you incorrectly put the password more than ten time. I immediately called my phone company (Verizon) and reported the phone stolen.So I know whoever took the phone cannot place calls or use the phone. But can they still access my data on the phone if they manage to unlock the phone?  If so how can I erase all data on the phone so the thief can't access my personal information? is there any other way other than Find my IPhone to wipe off the data on the phone? I really don't want my personal information such as pictures, text messages, notes and social networks profile available to a stranger!!? Help please!!!

        Hello thewrongway,
    I'm sorry to hear about your phone!  I understand the need for an active device. You are able to activate an old device and process an insurance claim for your iPhone 4s within 60days from the incident date.  Keep in mind if the old phone is not a smartphone and you currently have unlimited data that feature will fall off.  If you have a tier data plan no changes will be made.  Please let me know if you have any additional questions.  Thank you.   
    TominqueBo
    VZW Support
    Follow us on Twitter at @VZWSupport

  • How to know last access date for the schema's

    Dear all,
    could u plz tell me How to know last access date for the schema’s
    Regards,
    Srinivasa rao.P

    Srinivas,
    could u plz tell me How to know last access date for the schema’s
    In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
    Aman....

  • How to display language key (0LANGU) in the query for BW report

    Hi,
    Can someone tell me how to display language key (0LANGU) in the query? I want to display which language (English or French) is used for material description in BW report. Thx.

    hi,
    check if the infoobject is kept as lang dependent or not  for material text, else you need to create a masterdata attribute with text and lang keys and do corresponding mapping, so then it can be displayed in your report
    regards
    laksh

Maybe you are looking for

  • Balance Confirmation Report for multiple vendors

    Hi all, I have developed report in FI which gives details about opening balance,fiscal year, document number, posting date and amount in the output.In selection screen I am passing single values of fiscal year(GJAHR), vendor(LIFNR) and company code(B

  • Trigger a Mail when no file is placed

    Hi Everyone, How can we trigger a mail when no source file is placed for the file adapter to pick in a given time? Regards, Raghu

  • Embedded videos in Interactive PDF play sluggish

    I have created an Interactive PDF using Indesign CS6. It is a 43 page pdf with a video embedded on 5 of those pages. When the final PDF is played on a PC, the videos seems to play sluggishly after watching a previous video. It seems there is some sor

  • Exporting from iMovie back to Camcorder

    with iMovie 06 I used to be able to export a movie I made back into my DV camera. Is there an option to do this in iMovie '08? Since I don't have a Blu-Ray burner or player, I would like to send a movie back into my camera so that I can play it in Hi

  • How to install ink cartridges in officejet pro 8600

    I just purchased an officejet pro 8600 and after following visual setup  instructions and plugging the printer in I don't get any further instructions from the control panel nor can I find how to install  the ink cartridges in this model (seems the p