How to set cursor in the beginning of a test in a JTextField in Java Swings

hi
I am new to Swing.I have to display a large text in a text field.Whenever I am displaying it is showing the tale of the text.To see the beginning of the text I have to move the cursor using keys.How can I set the cursor in the beginning of the text or how can I display the text with its beginning characters.

You're practically there...
You usually put all the jars in the same directory and then specify the class-path attribute in your manifest:
Class-Path: other.jarYou can of course specify a relative path to another jar:
Class-Path: lib/other.jarBut that's up to you how you want to package these things.
I don't think that jars in jars are permitted.
Hope this helps.

Similar Messages

  • How to set cursor at the end of text item?

    If I use Go_Item, it will go to the item but select the whole content of the item(displayed in blue color). How can I set the cursor at the end of the text item and not to make the content selected?

    You may be seeing <Bug:1186653> which is fixed in 6.0.5.36 however if running on windows awprkaoutnd may be to use d2kwutil.
    Place the following code within a when-new-item-instance trigger on the
    item(s) you wish to disable highlighting:
    DECLARE
    v_handle pls_integer;
    BEGIN
    win_api_shell.sendkeys(V_HANDLE,'{home}',FALSE);
    END;
    The above code will result in no highlighting occurring and the cursor will be
    placed on the first character of the item. If you wish the cursor to appear at
    the end of the item, replace the word home to end. For more information,
    please refer to the d2kwutil documentation.
    Note that this solution will only work on windows in a client server environment.
    For a web solution you will have to create a java bean that will perform the
    necessary functionality.
    Regards
    Grant Ronald

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • Alv grid: how to set cursor to the next field

    Hi Abapers,
    When I input the data in first cell and do a tab for coming to next cell to give the input it is coming back to my first cell in the ALV grid.
    Any idea's on how do I deal with this.
    Many Thanks,
    Jagan.

    Hi Group,
    Finally I got the solution for this, here is the stuff we need to do:
    ***********04/03/2010
    *----Get the current cell
                CALL METHOD wa_grid->get_current_cell
                  IMPORTING
                    es_col_id = li_col
                    es_row_no = li_rows.
    **--Get Scroll Position
                CALL METHOD wa_grid->get_scroll_info_via_id
                  IMPORTING
                    es_col_info = ls_col
                    es_row_no   = ls_num.
    ***********04/03/2010
                CALL METHOD wa_grid->refresh_table_display.
               CLEAR: wa_profile1.     ", wa_pro_new.
    ********04/03/2010
    *--Set Scroll Position
                CALL METHOD wa_grid->set_scroll_info_via_id
                  EXPORTING
                    is_col_info = ls_col
                    is_row_no   = ls_num.
    *----Set the cell information
                ls_row-index = li_rows-row_id.
                CALL METHOD wa_grid->set_current_cell_via_id
                  EXPORTING
                    is_row_id    = ls_row
                    is_column_id = li_col
                    is_row_no    = li_rows.
    ********04/03/2010
    Hope this info might be useful to anyone facing the similar issue.
    Cheers,
    Jagan.

  • How to make Firefox (Mac) not go back a page upon pressing the Cmd+Left-Combination which should set the text cursor to the beginning of a line in input fields instead of leaving the page?

    On a Mac, Cmd+Left places the text cursor to the beginning of the line, Cmd+Right to the end of the line.
    FireFox however goes back resp. forward a page in hinstory, which is ''most annoying'', since it very often causes me to accidentally leave a still unsubmitted form and loose all input!
    I did not find any possibility to get rid of these dreadful keybindings.

    Thanks for your response.
    I guess I didn't revert to as far back as the change I had made because when I follow your instructions, no entries are bold.
    Or did you perhaps mean the next time the problem occurs I should look for a bold entry? And then change it back to what it was? (All that I recall from a year ago was that I changed one entry from ''true'' to ''false'', or vice versa.)

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • Does anyone know how to set alerts in the iCloud calendar of Outlook 2010 for PC?

    Does anyone know how to set alerts in the iCloud calendar on Microsoft Outlook 2010 for a PC?  Outlook gives me a warning message and does not allow me to save alerts for calendar events created in iCloud calendar.  It will allow me to save events in the non-iCloud calendars.

    Ignore what office says, when the warning comes up saying that the reminder will not work click on yes,
    I just tested it and i had the reminder on my ihpone in outlook and also as i had the calendar open in safari it popped up on there too ( I wasn't aware it did that)

  • How do I automatically capitalize the beginning of each sentence in Pages?

    Hello there!
    Please help...
    How do I automatically capitalize the beginning of each sentence in Pages version 5.2?
    The old version of Pages (Pages '09) automatically capitalizes the first word of each sentence. But in Pages 5.2, I have to manually capitalize the first word of every sentence. How can I make this automatic?
    The options in Menu > Format > Font > Capitalization, do not show an option for sentence capitalization. Please help. Thank you!

    Feature removed from Pages 5 along with over 100 others,
    Pages '09 should still be in your Applications/iWork folder.
    Pages 5 is a disastrous beta pushed onto users, and misrepresented by Apple as an "Upgrade".
    Peter

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • How to set Border in the Excel using UTL_FILE ?

    Hi all,
    Any one aware of
    How to set Border in the Excel using UTL_FILE ?
    Am doing excel creation from a stored procedure.
    Thanks
    Dora

    Hello Dora,
    if you need more than simple csv: at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the package behind the second link supports defining your own formats (and has a tutorial how to do it).
    Regards
    Marcus

  • How to SET CURSOR FIELD my_field in my_REPORT_PROG.?

    Hi Experts,
    If the user do not enter a value in one field( NOT mandatory field) on the selection screen of my_report_prog. I wanna,
    1- To throw message - am getting by throwing as STATUS message
    2 - wanna keep CURSOR on that particlar field in order to input the value by the user - am using SET CURSOR FILED my_filed----
    > but NOT working????????
    So, pls. let me know that How to get it done?
    thanq

    hi,
    try the following code.you will get the cursor in the same field if you use status message or information message.
    selection-screen:begin of block b with frame title text-001.
    parameters:a type i.
    selection-screen:end of block b.
    at selection-screen.
    if a <> 3.
    message s000(0) with 'hi this is chaitu'.
    endif.
    after showing the message the cursor is at a.
    please rewards points if useful.

  • How to set cursor in a component by default

    Hi all,
    Does anybody know how to set the cursor inside a textArea? or at any particular component of a frame?
    Thanks in advance.

    textAreaObj.requestFocus() doesn't do it?
    If that doesn't do it, then try textAreaObj.setSelectionStart(0).
    You may have to force a repaint(), possibly, as well.

  • How to set cursor property from "snap-to-plot" to free?

    dear all,
    is there any one know how to set a cursor property from "snap-to-plot" to "free"?
    this cursor is in a XY graphy
    i couldn't find coresponding property in the XY graph property node
    thank you
    Jack

    It looks like there are different property names depending on your labview version.
    You need to select the ActCrsr and then use the Cursor.Lockstyle property in LV7.1
    You need to select the ActCrsr and then use the Cursor.CursorMode property in LV8.2.

  • How to set cursor after submit via selection-screen

    hi guys,
    i would like to set cursor to certain field, after submit via selection-screen.
    eg.
    SUBMIT   z_mm_kbr_gr_label_01
                VIA SELECTION-SCREEN
                WITH p_mblnr = p_mblnr
                WITH p_zeile = p_zeile
                WITH p_gjahr = p_gjahr
                WITH p_ccode = p_ccode
                WITH p_dcode = p_dcode
                WITH p_crt = p_crt
                WITH p_print = p_print.
    i want to set cursor field 'p_ccode' after going back to
    z_mm_kbr_gr_label_01. the program always go to the first field on the screen whatever i do.
    may i know how to do this?
    thanks.

    Hi,
    Please try like below .
    at selection-screen output.
    SET CURSOR FIELD  'P_CCODE' .

Maybe you are looking for

  • Bootcamp mini-DVI second monitor compatibility?

    Hi, I am planning to buying an iMac 20-inch, 2.4GHz (Intel). I want to attach another 20-inch monitor via the mini-DVI port. This should be no problem as long as I stay in Max OSX (Leopard). BUT my question for help is if I (need to) boot up in Windo

  • Enhancment MM06E005 : Screen Size

    Hi, I am using Enhancement MM06E005 for Custom fields in Contract (Outline agreement) . I have created the field in Sub Screen :  SAPLXM06    0201. In the contract the Size of the Screen displaying as only 3 Lines. I have almost 50 Fields in the scre

  • Posterisation issues with DNG Profiles Editor

    I tried to tweak the Adobe Standard Beta for Nikon Coolpix 8700 profile to match the look of TIFF output of the same image from Capture NX. Though I could manage to get a perfect match of the colors (by way of around ten points in the green to red ra

  • CS4 crashes when moving layers

    I am running OS 10.5.8 on a 2.66 Quad-Core Xeon Mac Pro with 8G of ram.  OFTEN when I simply try and drag a layer above or below another layer, Photoshop will crash.  Has anyone experienced this before and have they found a working solution?

  • EHP4 error during Roadmap  2 (Extraction) of SAPehpi

    received the following error during Roadmap  2 (Extraction) of SAPehpi for EHP4 Checks after phase PREP_IMPORT/RUN_GENPUTTBSHD were negative! Last error code set: BATCH JOB RS_GENERATE_PUTTB_SHD FAILED: Error(s) found in the log(s), accumulated in "R