Getting right end of text displayed in cells of a JTable column

Hey All,
Platform: WinXP, Java 5.0.
I have a simple one-column table whose cells contain pathnames of user-selected files. The pathnames may be quite long, and when they're too long for the fixed width of the column (the containing JFrame is not resizable), I want the trailing (right) end of the pathnames to visible (so the filenames are visible) and for elipsis to be used on the left side (omitting root directory, etc., if need be). I can't figure out how to do this. I've tried many different approaches. Currently I use a class that extends TableCellRenderer, but no combination of alignment settings in this class seems to do the trick.
I've noticed that in the case of JTextFields, this manner of display seems to be the default, no matter what alignment setting I choose. I can't seem to get the desired effect with the display of cells in my JTable though.
Anyone have any suggestions?
Thanks in advance.

Great job camickr,
That did just what I wanted; you get the points for sure! I will say that It's surprising to me that Swing leaves so much work in calculation to be done for this simple idea.
Btw, I also want to mention here that there's another forum issue I raised and you responded to recently, and you never quite answered my question there:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=5160875
That's got 10 pts riding on it too, if you care to revisit the issue...
Thanks very much for the good work on the CellRenderer.

Similar Messages

  • Centering text in a cell in a JTable

    Hi,
    I have a program that reads in data from a text file and display it in a JTable. My problem is that the data in each cell is not centered, it is left justified within that cell.
    How can I fix this.
    --kirk                                                                                                                                                                                                                                                                                                                                                                                                                                            

    To align a text inside a cell you have to go through the rendering classes of a Jtable. You can do lots of formatting by using a render class. Heres my code that i use.
    1. The first code aligns your data centered inside the cell.
    2. The second code aligns it like code1 but has an additional character to be printed beside your data inside the text.
    ///////////// TO USE THE RENDER CODE IN YOUR APPLICATION /////
    TableColumn col1 = table.getColumnModel().getColumn(1);
    col1.setCellRenderer( new SimpleRenderer());
    or
    TableColumn col1 = table.getColumnModel().getColumn(1);
    col1.setCellRenderer( new SimpleRenderer( "$" ));
    ///////////// RENDER CODE IS HERE //////////////
    import javax.swing.table.*;
    import javax.swing.border.*;
    import javax.swing.*;
    import java.awt.*;
    public class SimpleRenderer extends JLabel implements TableCellRenderer
         Border unselectedBorder = null;
         Border selectedBorder = null;
         String text = "";
         Color foreColor = Color.black;
         Color backColor = new java.awt.Color( 217,217,255 );
         Color selectedColor = new java.awt.Color( 217,217,255 );
         public SimpleRenderer()
         super();
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         } // end of CONSTRUCTOR
         public SimpleRenderer( Color foreGround, Color backGround )
         super();
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         this.foreColor = foreGround;
         this.backColor = backGround;
         } // end of CONSTRUCTOR
         public SimpleRenderer( String data )
         super();
         text = data;
         setHorizontalAlignment( JLabel.CENTER );
         setOpaque( true );
         } // end of CONSTRUCTOR
         public Component getTableCellRendererComponent(
              JTable table, Object object, boolean isSelected, boolean hasFocus,
                                                                                    int row, int column)
         try
              if ( backColor != null )
                   if ( (row % 2 ) == 1 )
                             setBackground( backColor );
                   else
                             setBackground( Color.white );
              if ( foreColor != null )
                   setForeground( foreColor );
              if ( hasFocus )
                   if ( isSelected )
                             setBackground( selectedColor );
                   else
                             setBackground( Color.white );
              String newData = "" + object;
              if ( newData.trim().equals( "" ))
                   setText( "" );
              else
                   setText( text + " " + object );
              if (isSelected)
              if (selectedBorder == null)
                   Border border, raisedBevel, loweredBevel;
                   raisedBevel = BorderFactory.createRaisedBevelBorder();
                   loweredBevel = BorderFactory.createLoweredBevelBorder();
                   Border colorLine = BorderFactory.createLineBorder(Color.red);
                   border = BorderFactory.createCompoundBorder( raisedBevel,loweredBevel);
                   selectedBorder = BorderFactory.createCompoundBorder( border, colorLine);
              setBorder(selectedBorder);
              else
              if (unselectedBorder == null)
                        unselectedBorder = BorderFactory.createMatteBorder(0,0,0,0,
                        table.getBackground());
              setBorder(unselectedBorder);
         catch( ClassCastException e )
         return this;
         } // end of GETTABLECELLRENDERERCOMPONENT method.
         public void setForeColor( Color data )
         foreColor = data;
         } // end of SETFORECOLOR method.
         public void setBackColor( Color data )
         backColor = data;
         } // end of SETBACKCOLOR method.
    } /** end of CLASS **/
    /////////////

  • How do I change the colour of text in a cell in a JTable?

    I am trying to change the color of the text in a single cell in a JTable. I have tried not adding a cell renderer and it changes the colour of text in all cells.
    I have tried adding a cell renderer to the table and it does the same ie all cells text colour changes.
    I am able to add a cell renderer to a column and it changes all the cells in the column.
    I cannot figure out how to change just one single cell's text colour without effecting the other cells.

    Ok, so if i create my own cell renderer do I set it as the default renderer for the whole table i.e.
    table.setDefaultRenderer(MyCellRenderer, renderer);
    Does this set one cell renderer for the whole table or is there an individual one for each cell?

  • Black 564 cartridge has wrong fit tabs - where to go to get right end??

    Our all in one printer, Photosmart Plus model b209a, needs more black.  We bought the Genuine HP 564XL black, but found it did not fit.  The tab on the back of the cartridge matches the tabs on the back of the colors - however, the black we took out, has a different tab - it has a T, where as the others are upside down T's.  In addition, the 564 we bought had a bowtie shape on it, whereas the one that ran out had a pentagon on it.  The "new packaging" for the inks don't show pictures.
    Where do we find 564 pentagon inks? How can we tell if a 564 black is the right one for our printer going forward?

    The post here discusses this issue.  You have the 564 Photo black, you need the 564 black.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How display numeric datas in a JTable column on the right side?

    Hallo !
    I have a JTable using the AbstractTableModel.
    How can I display the numeric values on the right side of the column?
    Wolfgang

    It works, if I overwrite the TabModel-method "getColumnClass". But I cannot use this, because in german I have a "," in a double an not a "." as comma. So I get an Exception if the table tries to format 123,34 as a double.
    But I think there must be a possibility to format strings in a column. On the left side, in the center, on the right side. Do you know something to position Strings in a JTableColumn ?
    Wolfgang

  • If Number = than then display text from another cell

    Hi
    I'd appreciate it if anyone can help me with this please.
    I am putting together a gradebook type spreadsheet. I would like to display the text from another cell if the number entered in another cell is greater than or less than a certain number.
    So - if the number in cell A is equal to or greater than 70 then the text displayed in cell B equals the text contained in cell C
    Hope this makes sense.
    Many thanks in advance.
    regards,

    Hello Lee,
    The Numbers User Guide PDF available from the Numbers Help menu as a download is good reading for beginners. As a reference document, the iWork Formulas and Functions User Guide is also valuable.
    The function you need is called "IF", and the syntax is: IF "logic-expression" is true, then do this, else do this. As a calculation in a cell, that would have the form: =IF("Cell A" is equal to or greater than 70, then display the content of cell C, else display "something else") You need to provide the "something else", which can be a null string, "", if you wish.
    As you will find when you read the guide, the cells all have row and column address components where the column is identified by a letter of the alphabet and the row by a number. So If your data is in A1, your text string in B1 and your expression is in C1, you would write in C1:
    =IF(A1>=70, B1, "")
    Does this help?
    Jerry

  • Styled Text in Table Cell

    Hi,
    I've got this problem: I'd like to insert a styled text in some cells of a JTable.
    The text should be composed of two kinds of Font, to emphasize some characters in it.
    Suppose I've done a class Test, that extends JPanel. In this class I've done a method appendChar(String c, boolean bol). With this method I can add a JLabel with only a single char (String of length 1) at a time. If bol is true, it emphasizes the char; if false, it uses the "default" font. For example:
    "this is an example"
    This class works fine, but I don't have any idea on how I could be able to insert a Test instance in a JTable cell.
    I think I should create a class that implements TableCellEditor, or extends DefaultCellEditor.. but I don't know how this should be done.
    If there is some other way to have some styled text in a table cell, tell me!

    Hi,
    AFAIK, the default renderer for a table cell is a JLabel in which you can display styled text using html. You would need to provide a custom editor only if the default textfield doesn't fulfil your needs. For rendering, you need to override the renderer.
    Cheers,
    vidyut

  • [JS] [CS4] Right to left text when Placing

    Hey.
    In CS4 - If I want text to flow right-to-left for an entire story when doing a text file 'Place' what attributes do I need to set?
    Thanks for your help.

    I'm pretty sure that you need the style to be set to 
    the World Ready Composer to get right-to-left text to import correctly.
    Other than that, you might want to set the story direction (for multi-
    column frames), and paragraph direction as well as an apropriate font, 
    etc...
    Harbs
    http://www.in-tools.com

  • Getting error while displaying a cell as a button in ALV

    Hello All,
    I am trying to display a cell in ALV output as pushbutton. The following is the code I am using.
    DATA  BEGIN OF gt_list OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA  rowcolor(4) TYPE c.
    DATA  cellcolors TYPE lvc_t_scol.
    DATA  carrid_handle TYPE int4.
    DATA  connid_handle TYPE int4.
    DATA  cellstyles TYPE lvc_t_styl.
    DATA  END OF gt_list.
    LOOP AT gt_list.
          gs_style-fieldname = 'Details'.
          gs_style-style     = cl_gui_alv_grid=>mc_style_button.
          APPEND gs_style TO gt_list-cellstyles.
          MODIFY gt_list.
    ENDLOOP.
    CALL METHOD gr_alvgrid->set_table_for_first_display
          EXPORTING
            is_layout                     = gs_layout
          CHANGING
            it_outtab                     = gt_list
            it_fieldcatalog               = gt_fieldcat.
    But this is giving mr an error message that in call to method set_table_for_first_display type of it_outtab & gt_list do not match.
    Could anyone please suggest how to circumvent this error.
    Regards
    Indrajit.

    Hello Indrajit
    The following sample report is a variation of a previously published report () showing radiobuttons and pushbuttons (at cell level) within a single ALV list.
    *& Report  ZUS_SDN_ALV_WITH_RADIOBUTTONS1
    *& This program shows how to realize radiobuttons in ALV grid lists
    *& using event HOTSPOT_CLICK.
    *& In addition it shows how to realize pushbuttons at CELL level.
    *& Screen 100:
    *& - Flow logic
    *&      PROCESS BEFORE OUTPUT.
    *&        MODULE PBO.
    *&      PROCESS AFTER INPUT.
    *&        MODULE PAI.
    *& - Screen elements: none
    *& - ok-code field -> gd_okcode
    *& GUI Status MAIN100:
    *& - F3 = 'BACK', Shift+F3 = 'EXIT', F12 = 'CANC'
    PROGRAM zus_sdn_alv_with_radiobuttons.
    TYPE-POOLS: abap, icon.  " INCLUDE <icon>. for releases < 6.20
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1     TYPE iconname.
    TYPES: button2     TYPE iconname.
    TYPES: button3     TYPE iconname.
    TYPES: button4     TYPE iconname.
    TYPES: pushbutton  TYPE iconname.
    TYPES: cellstyles  TYPE lvc_t_styl.
    TYPES: END OF ty_s_sflight.
    DATA:
      gt_sflight    TYPE STANDARD TABLE OF ty_s_sflight,
      gs_layout     TYPE lvc_s_layo,
      gt_fcat       TYPE lvc_t_fcat.
    DATA:
      gd_okcode    TYPE ui_func,
      go_docking   TYPE REF TO cl_gui_docking_container,
      go_grid      TYPE REF TO cl_gui_alv_grid.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender,
          handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
            IMPORTING
              es_col_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    * define local data
        FIELD-SYMBOLS:
          <ls_entry>    TYPE ty_s_sflight,
          <ld_fld>      TYPE ANY.
        READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
        CHECK ( <ls_entry> IS ASSIGNED ).
    *   Set all radio buttons "unselected"
        <ls_entry>-button1 =  icon_wd_radio_button_empty.
        <ls_entry>-button2 =  icon_wd_radio_button_empty.
        <ls_entry>-button3 =  icon_wd_radio_button_empty.
        <ls_entry>-button4 =  icon_wd_radio_button_empty.
        ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
                                                  TO <ld_fld>.
        IF ( <ld_fld> IS ASSIGNED ).
    *     Set selected radio button "selected".
          <ld_fld> = icon_wd_radio_button.
        ENDIF.
    *   Force PAI followed by refresh of table display in PBO
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'REFRESH'
    *      IMPORTING
    *        RC       =
      ENDMETHOD.                    "handle_hotspot_click
      METHOD handle_button_click.
        MESSAGE 'Pushbutton selected' TYPE 'I'.
      ENDMETHOD.                    "handle_button_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    *       MAIN                                                          *
    START-OF-SELECTION.
      PERFORM select_data.
      PERFORM init_controls.
      PERFORM build_fieldcatalog.
      PERFORM set_layout.
      CALL METHOD go_grid->set_table_for_first_display
       EXPORTING
    *     i_structure_name = 'SFLIGHT'
          is_layout        = gs_layout
        CHANGING
          it_fieldcatalog  = gt_fcat
          it_outtab        = gt_sflight.
    * Link docking container to dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          lifetime_dynpro_dynpro_link = 3
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL SCREEN 100.
    END-OF-SELECTION.
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
    ENDMODULE.                    "PBO OUTPUT
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    * Leave report
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   Refresh table display
        WHEN 'REFRESH'.
          PERFORM refresh_display.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
      CLEAR gd_okcode.
    ENDMODULE.                    "PAI INPUT
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'ICON'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE gt_fcat WHERE ( fieldname <> 'NAME' ).
    * NOTE: field ICON-NAME has data element ICONNAME.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'SFLIGHT'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'NAME'.
      IF ( syst-subrc = 0 ).
        DELETE gt_fcat INDEX syst-tabix.
      ENDIF.
      ls_fcat-fieldname = 'PUSHBUTTON'.
      ls_fcat-coltext   = ls_fcat-fieldname.
    **  ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 5.
      ls_fcat-fieldname = 'BUTTON4'.
      ls_fcat-coltext   = ls_fcat-fieldname.
      ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 5.
      ls_fcat-fieldname = 'BUTTON3'.
      ls_fcat-coltext   = ls_fcat-fieldname.
      INSERT ls_fcat INTO gt_fcat INDEX 5.
      ls_fcat-fieldname = 'BUTTON2'.
      ls_fcat-coltext   = ls_fcat-fieldname.
      INSERT ls_fcat INTO gt_fcat INDEX 5.
      ls_fcat-fieldname = 'BUTTON1'.
      ls_fcat-coltext   = ls_fcat-fieldname.
      INSERT ls_fcat INTO gt_fcat INDEX 5.
    * Renumbering of the columns
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SELECT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM select_data .
    * define local data
      DATA:
        ls_sflight         TYPE ty_s_sflight,
        ld_style           TYPE raw4,
        ls_cellstyle       TYPE lvc_s_styl,
        lt_cellstyles      TYPE lvc_t_styl.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
      ls_sflight-button1 = icon_wd_radio_button. " selected radiobutton
      ls_sflight-button2 = icon_wd_radio_button_empty.
      ls_sflight-button3 = icon_wd_radio_button_empty.
      ls_sflight-button4 = icon_wd_radio_button_empty.
    * Alternatively: create icons using function module 'ICON_CREATE'
      MODIFY gt_sflight FROM ls_sflight
          TRANSPORTING button1 button2 button3 button4
        WHERE ( carrid IS NOT INITIAL ).
      ls_cellstyle-style2 = cl_gui_alv_grid=>mc_style_hotspot.
      APPEND ls_cellstyle TO lt_cellstyles.
      LOOP AT gt_sflight INTO ls_sflight.
        REFRESH: ls_sflight-cellstyles.
        CLEAR: ls_cellstyle.
        ls_cellstyle-fieldname = 'PUSHBUTTON'.
        IF ( syst-tabix < 6 ).
          ls_sflight-pushbutton = icon_detail.
          ls_cellstyle-style  = cl_gui_alv_grid=>mc_style_button.
          APPEND ls_cellstyle TO ls_sflight-cellstyles.
        ELSE.
          ls_sflight-pushbutton = space.
          ls_cellstyle-style  = cl_gui_alv_grid=>mc_style_hotspot_no.
          APPEND ls_cellstyle TO ls_sflight-cellstyles.
        ENDIF.
        MODIFY gt_sflight FROM ls_sflight.
      ENDLOOP.
    ENDFORM.                    " SELECT_DATA
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
      CHECK ( go_docking IS NOT BOUND ).
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
    *      REPID                       =
    *      DYNNR                       =
    *      SIDE                        = DOCK_AT_LEFT
    *      EXTENSION                   = 50
    *      STYLE                       =
    *      LIFETIME                    = lifetime_default
    *      CAPTION                     =
    *      METRIC                      = 0
          ratio                       = 90
    *      NO_AUTODEF_PROGID_DYNNR     =
    *      NAME                        =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Size of container = full screen size
      CALL METHOD go_docking->set_extension
        EXPORTING
          extension  = 99999
        EXCEPTIONS
          cntl_error = 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.
    * Create ALV grid instance
      CREATE OBJECT go_grid
        EXPORTING
    *      I_SHELLSTYLE      = 0
    *      I_LIFETIME        =
          i_parent          = go_docking
    *      I_APPL_EVENTS     = space
    *      I_PARENTDBG       =
    *      I_APPLOGPARENT    =
    *      I_GRAPHICSPARENT  =
    *      I_NAME            =
    *      I_FCAT_COMPLETE   = SPACE
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *   Set event handler for events
      SET HANDLER:
        lcl_eventhandler=>handle_hotspot_click FOR go_grid,
        lcl_eventhandler=>handle_button_click  FOR go_grid.
    ENDFORM.                    " INIT_CONTROLS
    *&      Form  REFRESH_DISPLAY
    *       Refresh table display after switching the radiobuttons
    *  -->  p1        text
    *  <--  p2        text
    FORM refresh_display .
    * define local data
      DATA:
        ls_stable    TYPE lvc_s_stbl.
      ls_stable-row = abap_true.
      ls_stable-col = abap_true.
      CALL METHOD go_grid->refresh_table_display
        EXPORTING
          is_stable      = ls_stable
    *        I_SOFT_REFRESH =
        EXCEPTIONS
          finished       = 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.
    ENDFORM.                    " REFRESH_DISPLAY
    *&      Form  SET_LAYOUT
    *       Set layout for ALV list
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout .
      CLEAR: gs_layout.
      gs_layout-cwidth_opt = abap_true.  " optimize column width
      gs_layout-zebra      = abap_true.
      gs_layout-stylefname = 'CELLSTYLES' .
    ENDFORM.                    " SET_LAYOUT

  • How do you get LabView7.0 to place a text display on top of a graph instead of it becoming buried and invisible?

    How do you get LabView7.0 to place a text display on top of a graph instead of it becoming buried and invisible?

    On your toolbar, you will see a little icon on the far right. The tip strip says Reorder. Select the graph, then the Reorder button and select Move to Back.

  • How can I get right data in a cell of JTable when table  enter editing

    how can I get right data in a cell of JTable when table enter editing

    how can I get right data in a cell of JTable when table enter editing

  • How to get the focus at the end of text ?

    I am having applet with awt TextField component and some default text. (MSQ-)
    To have a focus to text field I am using :
    refnoTextField.requestFocus();
    But this gives focus at the biginning and not at the end of text. I want the focus at the end (i.e. after MSQ-)
    How to get the focus at the end of text ?
    any help ?
    manisha
    manisha

    public void focusGained(FocusEvent e) {
         if (e.getSource() == yourtextbox) {
         yourtextbox.setSelectedEnd(yourtextbox.getLength());
    try this thing - not sure if it'll work, but I figgured out how to apply it to my textareas for keeping the focus on the last line of the textarea..it might work for your textboxes..
    shrug

  • The sprocket at the upper right end of the bookmark toolbar is missing--how do I get it back?

    While attempting to figure out how to get the dotted square or blank icon to turn into a favicon, I noticed that the subject of my question was missing. I do not mean the internet options sprocket that is in the drop down menu under the 3 lines icon at the right end of the address/search menu bar.
    Also, if you can give me any clues to how to fix the favicon issue, I would appreciate that.
    Thank you.

    I'm sorry but I don't remember there normally being a "gear" or "sprocket" icon on the right end of the Bookmarks Toolbar. Mine generally has an overflow icon (>>) which shows more bookmarks in a drop-down list. Do you have that one?
    Do you have any bookmark-related add-ons that might have added the other icon? Perhaps it needs an update. You can check the status of your extensions and check for updates on the Add-ons page. Either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then:
    (1) Make sure any bookmark-related extensions are enabled. Disabled extensions cluster at the bottom of the list on a gray background.
    (2) Use the "gear" button above the list to Check for Updates.
    Any improvement?

  • How do I get back the 'open new tab' button (+ sign at right end of tabs) in Firefox 4 ?

    How do I get back the 'open new tab' button (+ sign at right end of tabs) in Firefox 4 ? I realize there is a 'new tab' button at the right end of the toolbar but I like the new tab function placed next the tabs ?

    See also:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The "Use custom settings for history" setting allows to see the current history and cookie settings, but selecting that setting doesn't make any changes to history and cookie settings.<br />
    Firefox shows the "Use custom settings for history" setting as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.<br />
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".<br />

  • Clicking on the downward arrow at the right end of the location bar no longer displays the drop-down list of sites visited, bookmarks and addresses typed in location bar

    Since I upgraded to Firefox version 3.6.10, clicking on the downward arrow at the right end of the location bar no longer displays the drop-down list of sites visited, bookmarks and addresses typed in location bar. My Tools > Options > privacy setting is to save history, and if I start typing a previously accessed website's address in the location bar, then the full address appears as a drop-down item. But not when I just click at the right end of the bar.

    You can try "Reset all user preferences to Firefox defaults" on the [[Safe mode]] start window.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

Maybe you are looking for

  • My startup disk is "almost" and sometimes full, HD space fluctuates between 500 and 900GB used?

    so I bought an HD big enough to prevent this happening but I get the on error that makes me quit all app on a daily basis.  I check on info and says that HD sometimes has nearly 900GB used and other times 500 and bit, in both ocasions have checked af

  • Solaris 10 display configuration in x86

    Hi, Can anybody give the command for the display resolution configuration from command prompt in solaris 10. Regards, rsvk

  • Dynamic radio buttons in for loop

    Hello, what i am trying to do is create several radio buttons in a while loop, then assign an action listener and also some text to them. After doing this i want to add the radio button to a panel, so far i have the following code: JPanel content = n

  • LR mobile keywords

    Can keywords be assigned to pics using LR mobile on iPad and then uploaded to a LR desktop system ?

  • Every time i move my laptop screen the screen glitches

    Every time i touch the sides of my laptop screen to move it i get lines show up on my screen and sometimes my screen turns a light blue colour and it glitches i need help to know what is wrong with my macbook and how do i fix it?