How to make first row of JTable bold

I am working with JTable and unable to change to 1st row to BOLD

harshal_2010 wrote:
hi codingMonkey I know that u r very smart guy who doesn't know anythingWow! Could you really deduce that from a simple 'Why?'. Brilliant; absolutely phenomenal!
Oh, and by the way, I hope you like helping yourself. Saying "Hey, you stupid ugly jerk, will you help me with my question?" generally doesn't go down well on these fora.

Similar Messages

  • How to make first row as selected in af:table

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
    In all the pages across my application we have multi select enabled for the table[af:table].
    But when the pages are displayed,the first row is not selected by default.
    My requirement is to display first row as selected across all the tables in my app.
    I have the selectionListenerset as for example selectionListener="#{bindings.RSCMapVO2.collectionModel.makeCurrent}" in all the pages.
    Please suggest on how to make first row as selected.
    Regards,
    Praveen

    Hi
    Put these codes in your selection listner method(You have to define a selectionListner method in your backing bean and put this code segment
    (Special thanks go to Franks how posted this code segment. threadID=1089583)
    RichTable yourTable = (RichTable) selectionEvent.getSource();
    //the Collection Model is the object that provides the structured data
    //for the table to render
    CollectionModel yourTableModel = (CollectionModel) yourTable.getValue();
    //the ADF object that implements the CollectionModel is JUCtrlHierBinding. It
    //is wrapped by the CollectionModel API
    JUCtrlHierBinding yourTableBinding = (JUCtrlHierBinding) yourTableModel.getWrappedData();
    //Acess the ADF iterator binding that is used with ADF table binding
    DCIteratorBinding yourTableIteratorBinding = yourTableeBinding.getDCIteratorBinding();
    //the role of this method is to synchronize the table component selection
    //with the selection in the ADF model
    Object _selectedRowData = yourTable.getSelectedRowData();
    //cast to JUCtrlHierNodeBinding, which is the ADF object that represents
    //a row
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    //get the row key from the node binding and set it as the current row in the
    //iterator
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey(rwKey.toStringFormat(true));
    Thanks
    Padma

  • How to select first row of JTable by default

    Hi,
    I have a JTable with 5 rows.
    When the software starts, none of the rows are selected.
    I wish to keep the first row selected by default.
    How do I do it?
    I couldnt find any method like setSelectedRow() !!!
    Does anyone have a sample code plz?
    Thanks.
    Anuj

    couldnt find any method like
    setSelectedRow()You need to use getSelectionModel() first.
    Another way is to use:
    table.changeSelection(0, 0, false, false);

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to select a row in Jtable at runtime

    how to select a row in Jtable at runtime.

    use
    setRowSelectionInterval(int fromRowIndex, int toRowIndex);example if your table has 10 rows then u want to select the rows from 4 to 8 then use
    setRowSelectionInterval(3, 7);if you want to select just one row for example 5 then use
    setRowSelectionInterval(5, 5);

  • How to make the row as a hyperlink in Crystal 2008

    Hi,
    Could you give me advise on how to make the row as a hyperlink and call another report.
    Thank you in advance.
    Rose

    Hi Sastry,
    I was able to create the subreport and its working.
    Thank you so much.
    Regards.
    Rose

  • How to make Certain rows in the structure to be displayed as bold

    I have two structures in the query. There is a requirement that all values in Certain rows should be bold  I am talking about values and not the headers. The users are going to use the query through BEx Analyzer.
    I tried the Highlighted Display but it makes it only that row values BLUE. (this change makes them bold only on web).
    Please let me know if there is any way to display perticular row values in a structure in Bold.
    We have both versions 3.5 and 7.0 of BEx analyzer. The Query is on 7.0
    Thanks in Advance.
    2. I also have a requirement that all values from a perticular selection from column structure to be displayed as bold.
    ........................................Company Code1 Company Code 2 Comapany Code 3
    No Of Male Employees..................10.....................200........................30
    No Of Female Employees...........500.................70........................77
    So here All values in the row Female Employees should be bold and All values under Company Code 3 should be bold
    Edited by: Abhijit N on Dec 23, 2008 11:54 PM

    Hi Abhjit,
                 Please check formating option in bex analyzer for this.
    Plz check here......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55d2e09411d2acb90000e829fbfe/content.htm
    Regards,
    Vijay.

  • How to make the text in cells bold?

    Hi,
    does anyone know how I can make the contents of my cells in my JTable BOLD?
    Also, when I display another table of fewer rows in the same frame (using BorderLayout.CENTER), the part of the previous JTable that were previously filled with rows still shows (i.e. the extra space from the old table with longer rows is then white and not gray,which is the background of the frame,). How can I make sure the table is redrawn/rebuilt from scratch. firetableDataChanged() doesn't remove the extra white space.
    e.g I display a table to 5 rows in the frame. Then on some action, I create a new table and display it (3 rows) on top of the old one. Although the data changes as should, the outline of the extra space for the 2 extra rows from the previous one still shows, though without gridlines. How can I stop this?

    If you use:
    DefaultTableModel model = new DefaultTableModel();instead of:
    TableModel model = new DefaultTableModel();the AbstractTableModel methods become available, so now you can:
    model.fireTableStructureChanged();
    // or other property changes... see JavaDoc for more info...
    model.fireTableCellUpdated();
    model.fireTableDataChanged();
    ...That should solve the problem...
    Virtua11y

  • How to make numbered rows in Numbers

    How do I make numbered rows in Numbers?

    Hi Carol,
    It depends on whether you want the numbers to move with the rows if and when you sort, or if you always want the rows numbered top to bottom.
    There's a function that returns the row number: ROW(). Placing that in a cell always displays the number of the row. If you want to number once and then let the numnbers follow the data around, you can Fill with a sequence by typing "1" in the first row and "2" in the second row. Then select both cells and drag the Fill handle down the table to extend the series. The fill handle is the little open circle in the lower right corner of the selection.
    Jerry

  • How to make a row as selected in output internal table in oops ALV

    Hi All,
    I have ALV grid output using oops ALV concept, in my output i have a checkbox as first column when i select this checkbox and press a push button 'Print' which is there above ALV grid that particular line in output table should get selected and i need to code some logic for printing selected row.
    how to make the particluar row in the output internal table to be selected and where to write the logic for print once it is pressed?
    Thanks in advance
    Srilakshmi.

    but the checkbox is not getting set in internal table when i select some checkboxes.
    can anybody explain y the checkbox in internal table not set?
    Hi Srilakshmi,
    As explained by Uwe, when we change a field ( say check box ) in ALV grid, the view (frontend) changes (showing the tick mark) but the changed data ( normally ) is not transfered to the backend.
    We can initiate this data transfer by just registering the cl_gui_alv_grid=>mc_evt_modified  edit event
      go_grid->set_table_for_first_display( CHANGING  it_fieldcatalog      = pt_fieldcat
                                                      it_outtab            = pt_outtab ).
      go_grid->set_ready_for_input( 1 ).
      go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ). " This does the trick
    Now as soon as we check a checkbox, the data_changed event is triggered.
    This initiates data transfer to the backend and the checkbox field in internal table is updated.
    check the below code for example.
    DATA: go_cont            TYPE REF TO cl_gui_custom_container,
          go_grid            TYPE REF TO cl_gui_alv_grid,
          gt_fieldcat        TYPE lvc_t_fcat,
          gv_language        TYPE spras VALUE 'E',
          gt_outtab          TYPE TABLE OF bus_loca_demo WITH HEADER LINE.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'BASIC'.
      SET TITLEBAR  '001'.
      PERFORM create_and_init_alv CHANGING gt_outtab[]
                                           gt_fieldcat.
    ENDMODULE.                    "pbo OUTPUT
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'PRINT'.
          BREAK-POINT.
      ENDCASE.
    ENDMODULE.                    "pai INPUT
    FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
                                      pt_fieldcat TYPE lvc_t_fcat.
      CHECK go_cont IS NOT BOUND.
      CREATE OBJECT go_cont
        EXPORTING
          container_name = 'CUSTOM'.
      CREATE OBJECT go_grid
        EXPORTING
          i_parent = go_cont.
      PERFORM build_display_table.
      PERFORM build_fieldcat CHANGING pt_fieldcat.
      go_grid->set_table_for_first_display( CHANGING  it_fieldcatalog      = pt_fieldcat
                                                      it_outtab            = pt_outtab ).
      go_grid->set_ready_for_input( 1 ).
      go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ). " This does the trick
    ENDFORM.                               "CREATE_AND_INIT_ALV
    FORM build_display_table.
      FREE gt_outtab.
      DO 10 TIMES.
        gt_outtab-creation_partner = sy-index.
        gt_outtab-date_field       = sy-datum.
        APPEND gt_outtab.
      ENDDO.
    ENDFORM.                               "build_display_table
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'BUS_LOCA_DEMO'
        CHANGING
          ct_fieldcat      = pt_fieldcat.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'CHECKBOX'.
            ls_fcat-checkbox = 'X'.
            ls_fcat-edit     = abap_true.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'ENTER_FIELD' OR 'DBLCLICK_FIELD'.
            ls_fcat-no_out  = abap_true.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                               "build_fieldcat
    Cheers,
    Jose.

  • FCC..how to remove first row

    Hello experts,
    I have configured a end to end sccenario fo csv files, Im using fcc for the sender file adapter
    The first row has all the field names such as name,number and the rest of the rows have the values.
    when I run the scenario the xml being formed has the field names and the vales..
    example
    <name>name</name>
    <number>number</number>
    <name>Teja</name>
    <number>10</number>
    what i want in the xml is just
    <name>Teja</name>
    <number>10</number>
    could any one pls help me out on this?
    I have used fieldNames,fielsSeparaor and ignorerecorstSetName as the content conversion parameters..
    do i have to add any more?
    Regards,
    Teja

    Hi,
    You should achieve this by using Document Offset parameter on the Sender side.  Set Document Offset to 1 in order  to ignore the first line.
    "●      Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
    This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines."
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    Thanks,
    Pooja

  • How to remove a row from JTable

    Hi!
    I'm used to remove rows from JTables getting the model and doing a removeRow(num) like this:
    ((DefaultTableModel)jTable1.getModel()).removeRow(0);
    But with ADF and JDeveloper the model says it's a JUTableBinding.JUTableModel but its not accessible.
    How to remove a row in Jdeveloper 10.1.3.4.0?

    Or maybe is just better to refresh data in the jTable but I do not know either like doing it.

  • How to disable first row selection in a table

    Hi,
    I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
    what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
    Thank You,
    Sukumar

    I know a hack but I don't recommend it, anyway here it goes:
    Remove selected Row Keys
    Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
    This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
    This method is tested with 11.1.1.7

  • How to set special rows in jtable not selectable

    Hello programmers,
    anybody knows how to set special rows(p.E. row 0) in jtable not selectable.
    in advance thanks for your answers

    table = new JTable(...)
         public void changeSelection(int row, int column, boolean toggle, boolean extend)
              if (row == 0)
                   return;
              else
                   super.changeSelection(row, column, toggle, extend);
    };

  • How to  make JTextArea rows and colums auto-increase?

    My test program is attached as below.
    The JTextArea can not enlarge itself when the text in a line is too long that some characters are hidden.When rows grows too many will also see the problem.
    How can I make the rows and columns auto-increase to meet the width or height of my text?
    -----My Test Demo----
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.color.*;
    import javax.swing.*;
    public class Test{
    public static void main(String[] args){
    JFrame f = new JFrame("My Editor");
    Container ct = f.getContentPane();
    JPanel jp = new JPanel();
    JTextArea ta = new JTextArea("My software.",10,30);
    JTextArea ta2 = new JTextArea("Hello,World!",10,30);
    jp.setPreferredSize(new Dimension(400,400));
    jp.setBackground(Color.green);
    jp.setLayout(null);
    jp.add(ta);
    ta.setBounds(100,100,150,200);
    ta.setOpaque(false);
    ta.setBorder(null);
    jp.add(ta2);
    ta2.setBounds(100,120,150,200);
    ta2.setOpaque(false);
    ta2.setBorder(null);
    // jp.addMouseListener(new MyMouseListener());
    ct.setLayout(new BorderLayout());
    ct.add(jp,BorderLayout.CENTER);
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent evt) {
    System.exit(0);
    f.setVisible(true);
    f.pack();

    This link to the Java Swing tutorial will show you how to add the JTextArea to a JScrollPane:
    http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html#textarea
    It appears to me that you are new to Swing so you should read the entire tutorial "Creating a GUI using JFC/Swing" before asking any more question. The tutorial can be read online or downloaded from:
    http://java.sun.com/docs/books/tutorial/
    The download link for all tutorials on this page is near the bottom.

Maybe you are looking for

  • Connecting One process Server to Multiple SAP Systems

    Hi Experts, We have a licensed version of the SAP CPS with the Process server limit parameter set to 4, which means we are limited to 4 process server as per my understanding. But when we create a SAP system the process server and the respective Queu

  • View of standard tables in ides

    hi i am beginner of ABAP i am installed sap demo system (ides erp)  but unable to view records of standard table such as mara,vbap etc. the fields and data element are able to view but unable to view the record it displayed as " NO TABLE ENTRIES FOUN

  • Iam in saudia arabia my i phone 5s send international sms i can notstop it

    my phone send message alone to international number and my balane decrease 0044....... 4- 6 messages every day i closed imms and still send alone and can not know which programm do it

  • How Best to Demo "Drop Box" and "Shared" Group Tabs?

    In presenting iTunes U to faculty in a "live" forum, I log in as a user with Edit privileges (obviously) so that I can show how changing Student access from the default Download to either "Drop Box" or "Shared" effects this feature. However, I cannot

  • Account Row ID field

    Hello All, A small question, We noticed that first four letters of account Row Id is always fix for all account records, i.e. AAPA followed by hyphen. Can we assume, this prefix will be always fixed and only suffix will change? Please suggest. Thanks