Problem displaying tooltip if one column is divided into 3 columns

Hi,
I have a column divided into 3 columns using custom cell render, tool tips are displayed correctly for sub 3 columns but once the user re sizes the column the tool tip locations are not accurate means in one column only all the tool tips are getting displayed. below is the code.
JTable table = new JTable(rowData, columnNames);
TableColumn col = table.getColumnModel().getColumn(1);
col.setCellRenderer(new MyTableCellRenderer());
public class MyTableCellRenderer implements TableCellRenderer {
     @Override
     public Component getTableCellRendererComponent(JTable arg0, Object arg1,
               boolean arg2, boolean arg3, int arg4, int arg5) {
          Object columnNames[] = { "propname", "oldvalue", "newvalue" };
          Object rowData[][] = { { "propname1", "oldvalue1ewewewewewewewewewewewewdddd", "newvalue1" },
                    { "propname2", "oldvalue2", "newvalue2" } };
          JTable dynTable = new JTable(rowData, columnNames);
          dynTable.getColumnModel().getColumn(0).setCellRenderer(new toolTipCellRenderer());
          dynTable.getColumnModel().getColumn(1).setCellRenderer(new toolTipCellRenderer());
          dynTable.getColumnModel().getColumn(2).setCellRenderer(new toolTipCellRenderer());          
          return dynTable;
class toolTipCellRenderer extends DefaultTableCellRenderer {
@Override
public Component getTableCellRendererComponent (JTable table,Object value, boolean isSelected, boolean hasFocus, int row, int column){
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
( (JComponent) c ).setToolTipText(value.toString());
return c;
Please help thanks in advance
Edited by: Moin82 on Sep 14, 2010 12:44 AM
Edited by: Moin82 on Sep 14, 2010 12:44 AM

Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
To get better help sooner, post a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://mindprod.com/jgloss/sscce.html] that demonstrates the incorrect behaviour.
db

Similar Messages

  • Displaying more than one column in TreeControl

    Hi,
    I have three tables ( LaborOperation, LaborIndex, LaborData). In TreeControl, i am displaying the following table columns,
    LaborOperation ->operationid,
    LaborIndex -> indexid,
    LaborData -> date, value.
    i want to be like this.
    + Operation Id(Single Column)
    + OperationIndex(Single Column)
    -OperationData(Multiple Column)
    I can able to display single column values in tree control by setting the nodedifinition property in tree control. i can't able to display more than one column in tree control.
    any idea about this problem
    thanks in advance.
    -Nainar

    Arun Prasath wrote:
    I want to display more than one row in a multiple columns of a single row.
    For example,
    In oracle apps, there are multiple tax lines for a single invoice. Each tax lines having their own entry in tax detail table.
    When i try to display a single invoice's details in a single row i found the difficulty.Hmm did you see the title of the forum? Oracle Database » General Questions !
    May be you want to check the Oracle Apps forum?
    Aman....

  • What happened to Format Bar:  "Dividing text into columns"

    This function is in the manual under "Working with Text" but it does not appear in the Format Bar.  What am I missing?

    E. Seagull,
    The Format Bar is a Contextual Menu. As you know, that means that it only shows the controls that pertain to the current situation. If you aren't working in a Text Box or Shape that might need to be divided into columns, the columns control will be available, otherwise it will not.
    I hope that you referring to the way text winds itself from column to column, like in a newspaper, and not the entirely different concept of parsing a long string into multiple table cells. Numbers doesn't include a feature for that type of parsing.
    Jerry

  • When creating a "lookup" column be able to display not only one column from the other list, but additional columns

    With the lookup technique, it is possible to select an item from another list and display one column of this item
    It is obviously possible to create several lookup columns on the same list and therefore display several columns
    There’s a high risk of not selecting the same item and therefore have inconsistent columns
    The Requirement therefore consist of being able of displaying several columns of the same item from the other list, based on one unique selection
    Example:
    In list(x), define lookup column on list (y), column Title (possible today)
    Then define a “secondary” lookup column on same list, column Code
    The effect would be that when selecting an item from list (X), both Title and Code would show up consistently in 2 different columns of list (Y)
    All possible solutions are welcomed

    If you are using SharePoint 2010, you can retrieve additional columns when adding a Lookup. If you are using 2007, there is no direct OOTB way, but the following two posts provide potential work-arounds:
    https://www.definitivelogic.com/blog/microsoft-sharepoint-2007-pulling-column-data-one-list-another-based-common-list-field
    http://stefan-stanev-sharepoint-blog.blogspot.com/2010/11/sharepoint-2007-associated-lookup.html
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to display more than one column with for each

    Hi guys,
    how to display more than one column with for each like below?
    for each
    Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7
    Item8
    Item9
    Item10
    End for each
    for each          
    Item1     Item2     Item3
    Item4     Item5     Item6
    Item7     Item8     Item9
    Item10          
    End for each

    Take a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
    Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
    Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
    Thanks,
    Bipuser

  • Display More then one column in to POP LIST OF VALUE Item

    Dear All,
    i want to display More then one column in to POP LIST OF VALUE Item like POINTNO,CITY_NAME,REGION_NAME,POSTEL_CODE .
    How can i display these 5 Column in to POP UP LIST OF VALUE Item.
    Thanks
    Vedant

    Hi,
    Here is my example how to get the address data from address book:
    on page, where is the IR report with many columns (as a popup page) there is a Column Link of URL type - you can choose any colulmn .
    In the URL address type: javascript:passBack('#ID#', '#NAME#', '#SURENAME#', '#COMPANY#', '#STREET#', '#CITY#', '#POSTAL_CODE#', '#STATE#' );self.close();
    self.close function close the popup after fetch.
    It will call a passBack function declared in page header.
    Example:
    <script language = "JavaScript">
    function passBack(v_addr_id, v_name, v_suren, v_comp, v_street, v_city, v_postal_code, v_state) {
    opener.document.getElementById('P2_ADDRESS_ID').value = v_addr_id;
    opener.document.getElementById('P2_ADR_NAME').value = v_name;
    opener.document.getElementById('P2_ADR_SURENAME').value = v_suren;
    opener.document.getElementById('P2_ADR_COMPANY').value = v_comp;
    opener.document.getElementById('P2_ADR_STREET').value = v_street;
    opener.document.getElementById('P2_ADR_CITY').value = v_city;
    opener.document.getElementById('P2_ADR_POSTAL_CODE').value = v_postal_code;
    opener.document.getElementById('P2_ADR_STATE').value = v_state;
    </script>
    If you want set only one value, just make a similar function with only one parameter.
    I hope it will help to you
    J

  • Displaying more than one display attribute in a tree component problem

    Hi,
    I have a parent table and child table, I want to display a parent table's display attribute and below that i want to display child tables two display attributes (while defining the rule for a tree compoment).
    What i'm getting is :
    I can able to display more than one "display attributes" for my parent table, but when i'm trying to implement that for my child table under my parent table. I am only geting the blank folder structure without names.
    For example:
    Parent table: Deparetment(id, name)
    child table: Employee(id, firstName, lastName)
    What i want is:
    In a Tree:-
    (Department name): software below that i want display both (firstName and LastName) stephen Fleming
    for that employee.

    Hi,
    do you use ADF ? If yes, have a look at "master table with inline detail" option when dragging the master View
    Frank

  • Problem displaying two columns in JCombobox using EnumerationBinding

    I am using a JComboBox with an EnumerationBinding where I selected two attributes to be displayed in the combobox. But, it displays the first one only.
    I am using jDeveloper 9.0.3 version(latest version).
    The code is as follows.
    public void jbinit(){
    JComboBox cb = new JComboBox();
    cb.setModel(JUComboBoxBinding.createNavigationBinding(panelBinding, cb, "RecPositionView", null, "RecPositionViewIter", new String[]{"Code", "Descr"}, null, null));
    The combobox only displays the code but I want the combobox to display the code as well as the Descr. Does anyone know how to do it?
    Thanks in advance.
    Urmila

    The combobox only displays the code but I want the combobox to display the code as well as the Descr. Does anyone know how to do it?
    You're running into a known bug 2610954.

  • How to divide 2 columns totals in ALv grid

    Hi All,
    i developed alv report & displayed totals. now i need to divide those totals and display as another column total.
    anyone please suggest.
    col1    col2    col3
    tot1     tot2     tot3
    tot3 = tot2 / tot1.
    thanks,

    Hi,
    For this, in HTML_TOP_OF_PAGE or  TOP_OF_PAGE first you need to get global reference variable for GRID
    for getting reference call FM GET_GLOBALS_FROM_SLVC_FULLSCR.
    By using this reference  call method GET_SUBTOTALS it will get the all total into Internal Table .
    Using Field Symbols u can calculate. Still u have any problem i will help u further .
    Regards,
    Ravindra.

  • Problems displaying rtf memo fields

    Post Author: Davidm
    CA Forum: General
    We use Crystal Reports X to run reports on an Access database with a significant number of rtf memo fields. We use Total Access Memo to allow extended use of rtf within Access as our users require the additional formatting capabilities that this offers.
    However, there are considerable problems displaying items like bullet points, tables and hyperlinks in the Crystal Viewer with tables in particular coming out in a real mess with all entries in the table being displayed in a list with a small square marking each cell at the end of each line.
    Curiously, if you preview the report in the full version of Crystal X, it appears a bit better with the hyperlinks still underlined (bullet points still vanish) and rows in rtf tables are at least presented as a row even if the columns are not ordered and mixed (with no bounding cells visible).
    Firstly, is this disparity of end result between full Crystal X Print Preview and the Crystal X Viewer fixable?
    Secondly, is the limited handling of rtf tags likely to be solved in the next release of Crystal?

    Hi Mathias,
    If I caught you correctly, you want to display data in Adobe forms in form of tabel, right?
    So, follow the steps:
    1. Insert one sub form on your adobe form.
    2. Set its type as "flow content" in object->subform property.
    3. Set flow direction as "Table".
    4. Insert another subform inside this subform.
    5. set its type as "flow content" and flow direction as "Table row".
    6. Now, choose binding tab, and there check "repeat subform for each Data item check box" and specify min. count for your rows.
    7. Now, insert your column fields inside this sub form once.
    8. Format its look and feel as you want.
    When you run this application, it will show you multiple data as table on Adobe form.
    Regards,
    Bhavik

  • Displaying HFM Member name and description in separate columns

    Hi,
    I am trying to show HFM member code(Account Code) and Description in two columns in Financial Report (FR),anyone has idea whether that would be possible in HFM reports?
    I thought of using MemberDesc but that will not serve my purpose.
    Thanks
    Asamant

    Hi,
    I have to use that function not using grid,its like this:
    AcctCode & Description : Generally we show member name,description or both in one column,fine.
    But user's requirement is :Display Code in one column and Description in other column.
    I think you understood my problem now.
    Thanks
    Asamant

  • Divide text into columns

    I imported a tab delineated file into numbers and it put it into 1 column. The manual shows a menu bar Item "Divide text into columns" that doesn't appear on my tool bar. What now?

    Mac,
    Got it. Thanks for the explicit reference, that really helps.
    I think the User Guide is a bit misleading there. The Guide is referring to the text in a Text Box and how you can format the box to display text in multiple columns, as in a newspaper page.
    This feature doesn't parse your data into table columns, sorry. If you want to describe your data, we may be able to help with that.
    It may be simple. Let's try the simple approach. If you Select and Copy the tab delimited data, then switch to a Numbers Table, click ONCE in a table cell and Command-V. Your data should spread across columns. If you click twice in a cell all your data will go into one column when you paste.
    Jerry

  • Display results in one row

    Query below is returning data in multiple rows, I want to display them as one row:
    select
    event_id,
    data_type_cd,
    quantity
    from Event,Data_types
    where event_id = 1234
    and event.DATA_TYPE_ID = data_types.DATA_TYPE_ID
    (I want to display data_type_cd concatenated with quantity as every code had different quantity)

      > Sample data is:
      > Data_type_id Quantity
      > ------------------ ----------
      > 1 34
      > 2 67
      > 15 35
      > 20 23
      > I want to display as:
      > 1 34 2 67 15 35 20 23
    if you want all the rows in one column see this given example below:
      SQL> select t.*
        2    from (select  1 data_type_id, 34 quantity from dual union all
        3          select  2 data_type_id, 67 quantity from dual union all
        4          select 15 data_type_id, 35 quantity from dual union all
        5          select 20 data_type_id, 23 quantity from dual) t;
      DATA_TYPE_ID   QUANTITY
                 1         34
                 2         67
                15         35
                20         23
      SQL> select substr(sys_xmlagg(xmlelement(col, ' ' || data_type_id||' '||quantity)).extract('/ROWSET/COL/text()').getclobval(), 2) new_disp
        2    from (select  1 data_type_id, 34 quantity from dual union all
        3          select  2 data_type_id, 67 quantity from dual union all
        4          select 15 data_type_id, 35 quantity from dual union all
        5          select 20 data_type_id, 23 quantity from dual) t;
      NEW_DISP
      1 34 2 67 15 35 20 23
      SQL>

  • Report not displaying data from one of the infoproviders

    Hi Experts,
    Issue: Report not displaying data from one of the infoproviders
    I have a report 'ReportA' which has multiprovider MP1 as the source.
    MP1 has two Infocubes IC1, IC2 in its design.
    Now, when i execute the report, data from IC1 is displayed. But no data from IC2 is displayed.
    Is there a setting i need to enable in MP1 ? or is there anything else that needs to be enabled ?
    Please reply.
    Regards,
    Suraj S Nair

    Hi All,
    When i display data directly from the multi provider, without any restrictions, i cannot view the data from infocube IC2.
    I feel its not an issue with the Query. It must be a problem with the setting in the Multiprovider MP1.
    Infocube IC2 is a copy of Infocube IC1. Multiprovider MP1 first only had IC1 in its design. It was recently IC2 was also included.
    I checked the Characteristics, all of them are assigned corectly.
    Now, this issue sure has something to do wiht the setting of Multiprovider or please correct me if wrong.
    Regards,
    Suraj S Nair

  • Problem displaying CLOB in text file

    Hello All,
    I have a problem displaying the content from the database in notepad. When I click on a link on my jsf screen, I retrieve the data and display it in notepad.
    I have my text content stored in the database with CLOB datatype. When I look in the database the data looks in the following format:
    ---------STARTS FROM NEXT LINE-------------
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.
    Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.
    Sincerely,
    ABC
    ----------ENDS IN THE PREVIOUS LINE------------
    Now when I display this content onto the notepad, all the spaces and new line characters are lost, and the entire display looks awkward. This is how it looks:
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.[]Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.[]Sincerely,[]ABC
    All the new line characters are lost and it just puts some junk character in place of a new line.
    When I copy the same text onto textpad, everything is alright and it displays exactly the way it is present in the database. I am also open to display the content in html, but in HTML it doesn't even display me the junk character in place of new line. It is just one single string without any line separators.
    I am using the following code to put the content into the text.
    public String writeMessage(){
       OutputStream outStream = null;
       HttpServletResponse response = getServletResponseFromFacesContext();
       Reader data = null;
       Writer writer = null;
       try{
          response.reset();
          response.setContentType("text/plain; charset=UTF-8");
          response.setHeader("Content-Disposition","attachment; filename="+id+"_Message.txt");
          outStream = response.getOutputStream();
          QueryRemote remote = serviceLocator.getQueriessEJB();
          data = remote.retrieveGovernorsVetoMessage(billId);
          writer = new BufferedWriter(new OutputStreamWriter( outStream, "UTF-8" ) );
          int charsRead;
          char[] cbuf = new char[1024];
          while ((charsRead = data.read(cbuf)) != -1) {
             System.out.println(charsRead);
          writer.write(cbuf, 0, charsRead);
          writer.flush();
       }catch(Exception ex){
          ex.printStackTrace();
       }finally{
          //Close outStream, data, writer
          facesContext.responseComplete();
       return null;
    }Any help or hints on resolving this issue would be highly appreciated.
    Thanks.

    The data is imported from a third party application to my database. It doesn't display any newline characters when I view the data.
    But when I do a regular expression search on text pad, I could see that my clob contains \n as the new line character. Is there a way to replace \n with \n\r while writing the data.
    Thanks.

Maybe you are looking for