How to display 2 lines in the same column header of jTable?

Please could you help me to display 2 character lines in the same column header of a JTable?
And how to make a fusion between to cells?
Thank you very much

In Swing, most components will accept text in the html format
http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
You can then use <br> tags to make your header text multiline

Similar Messages

  • Problem in Adding two buttons under same column header (in JTable)

    Hi,
    I have a JTable and to a particular column i want to add two buttons.
    Here the two buttons should be under the same column header and i need to add listners to these.
    Any idea how to do this?
    Thanks & regards
    Neel

    Of course as your header is drawn by a renderer, the buttons don't actually work, but you can listen for mouse clicks within the area of the header and see which button the mouse position was over.
    See the Java Table Sorter Demo code for how to add a mouse listener to the header...
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#TableSorterDemo
    ....and from there you should be able to determine where in the component the click occured by using the getX() and getY() methods of the MouseEvent to determine which button in the renderer component was clicked. Use something like Rectangle.contains() to match the click location against the buttons.

  • How to display multiple reports at the same time

    Hi,
    I'm trying to display multiple reports at the same time, each one in separates tabs or windows using Forms 11g 11.1.1.6
    I have a button which has a call to a procedure which makes use of rp2rro library to show the specific reports, for example:
    call_report('report1');
    call_report('report2');
    call_report('report3');
    call_report('report4');
    The main problem is that, just the last report is been displayed.
    Is there some way to display report1, report2 etc in separate tabs or windows ??
    Regards
    Carlos

    You shouldn't have a problem calling different reports at once. As long as you're using Forms 11g they show up in different windows.
    The question is how you are calling the report.
    Here is how I manipulate it.
    After I pass parameters with the ADD_PARAMETER built-in I set some key values (destype, desformat, desname) with the RP2RRO's procedures.
    Finally calling RP2RRO.RP2RRO_RUN_PRODUCT and then WEB.SHOW_DOCUMENT passing the correct procedure parameters the report comes up in a window. If you repeat the above changing the appropriate variables (the report_name in the RP2RRO_RUN_PRODUCT and so on) you can get multiple reports in different windows.

  • Print data in two line in the same column

    Hi,
    In a tabular Report I want to print a column (eg:Description,) in two lines in the same cell.
    Since the description is too long. Is it possible in report 6i. Or any other solution for this?
    Please reply.

    Hello,
    For the Description field set the Vertical Elasticity to EXPAND. Then it will adjust automatically based on data.
    -Ammad

  • How to display multiple signals on the same chart/graph

    Hello,
    I have a text file that has 21 different signals acquired through NI DAQ. I am able to read the file and display on the chart but the problem is all the signals have the same dynamic range -6 to +6 so when plotted they all show up on top of each other and one cannot really discern whats going on. Please see the attached image.
    I am trying to ask the community for help on how could I display all 21 signals separate from each other so that the user can easily differentiate between signals. I thought about adding offsets to the signals but I dont really want to change the actual data and the data set is already large enough that I donot want to creat copies of data.
    I am running Labview 10.0.
    Any creative ideas.
    Attachments:
    Graph Question.PNG ‏19 KB

    Using Stack Plots was my first thought too but it appears to be buggy these days. I know I've used it before with no problems but I can't get it to work now at all. In any case, stacking 21 plots will be futile since you won't be able to see any detail (unless you have a VERY tall monitor).  Your best bet is to use property nodes to make the plot of interest become highlighted in some way. 
    EDIT:  I think stacking only works with charts.  You can select it on the right-click pop-up menu.  Then, expanding the plot legend determines the number of stacked plots shown.  Again, since there is so much wasted vertical space when stacking, you'll never be able to see 21 plots concurrently with any detail visible.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • How to display 4 graphs on the same graphs display when running the VI 4 times ?

    My goal is trying to display 4 different graphs on the the same XY graph when I run the VI 4 times. Right now, the new graph will overdrive the previous graph when I re-run the VI.
    Please help!
    Solved!
    Go to Solution.

    You need a mechanism for storing previous data; LabVIEW graphs do not have a history, they display sets of data.  A shift register is an obvious answer, but it can get somewhat "tricky" when the Build XY Graph is used as it accepts a DDT and you cannot simply append a data set using array functions...
    The solution?
    Rather than make the changes for you, I've created a simple example for a regular graph to show you how to use an un-initialized shift register to store values from previous runs (the data will be lost when the VI is closed) as long as the VI is in memory.
    I'll leave the DDT conversion from the 2D-array and XY graph implementation for you to figure out in case this is some form of a homework assignment.
    Good luck!
    -Bob
    Message Edited by B O B on 11-20-2009 04:53 PM
    -Bob
    Attachments:
    Example 2.vi ‏12 KB

  • How to display all layers at the same time?

    Hi,
    I have created several theme based FOIs with a checkbox to set visible them. Each theme has some data and when you click in the theme region it displays this data in an information box. But when I set visible more than one theme, can only display the information box of the last one theme that I set visible (the others are not clickable because they are under the last no?). Is there anyway to make all of them clickable at the same time?
    For each theme that I create I call this function:
         function addThemeBasedFOI(value, i) {
              /* Add JDBC SQL Query theme based FOI */
              baseQuery = "SELECT value,annotation as label FROM " + value;
              var theme = "<themes><theme name='JDBC_THEME'>"
                        + "<jdbc_query asis='true' spatial_column='value' jdbc_srid='4326' label_column='label' " +
         "render_style='colorScheme' datasource='DSTest'>"
                        + baseQuery + "</jdbc_query></theme></themes>";
              buffertheme = new MVThemeBasedFOI('bufferthemeL_' + i, theme);
              buffertheme.addStyle(sc1);          
              buffertheme.enableLabels(true);
              buffertheme.setBringToTopOnMouseOver(true);
              buffertheme.setVisible(false);
              buffertheme.setClickable(true);
              buffertheme.enableInfoWindow(true);
              buffertheme.setAutoRefresh(true);
              buffertheme.attachEventListener(MVEvent.MOUSE_CLICK, showInfoPanel);          
              mapview.addThemeBasedFOI(buffertheme);
         function showInfoPanel (loc, foi){
              var width = 250;
              var height = 150;
              var html = "<p style='color:blue'>Name:<br><font color='black'>" + foi.name + "</font></p><br><p style='color:blue'>Localization:<br><font color='black'> X:" + loc.getPointX() + "<br> Y:" + loc.getPointY() + "</font></p>";
              mapview.displayInfoWindow(loc, html, width, height, "MVInfoWindowStyle4");
    /* Function to set visible a layer */
    function setVisible(item) {
              var themebasedfoi = mapview.getThemeBasedFOI(item.value);
              themebasedfoi.setVisible(!themebasedfoi.isVisible());
              if(themebasedfoi.isVisible()) {
                   themebasedfoi.centerToTheme();
                   themebasedfoi.zoomToTheme();
    Thanks in advance,
    Esteban.

    Hi Esteban,
    pls refer to these threads - they may help you with that issue:
    Re: MVThemeBasedFOI Index
    MapViewer and WMS layers
    Dominik

  • How to display Various currency categories in same column in ALV grid?

    hi..
    i wanted to display currency field in a column which has the currency value of different currency categories like US dollar, EURO, Indian Rupees. The thing is,
    1. for US dollar it should contain ONLY last 2 decimal pts.
    2. for Euro, it should hav contain last 3 decimal pts.
    3. For Indian, it should hav contain last 2 decimal pts.
    how to achieve this in one column and how to declare it, because it all in same field.
    This report is in ALV GRID.
    and important is , i also wanted to do the SUM for the total amount which has combinations of all above specified currencies.
    how to achieve it.
    any answer will be rewarded.?
    reply soon.

    You need two columns amount and currency code in your internal table, the fields must be of type CURR and CUKY, and the field catalog must link the amount and the currency code. (CFIELDNAME of the amount column contains the name of the currency code column)
    The amount will be displayed according to the currency code definition in customizing, and will be summed by currency code.
    Regards

  • Display two characteristics in the same column

    Hi everyone,
    I have two cubes that store key figures in two different ways.
    In the first cube I have several key figures like "Amount in Local Currency", "Amount in Document Currency" etc. these have the currency characteristics  "Local currency"(0LOC_CURRCY) and "Document Currency"(0DOC_CURRCY) associated with them.
    In the second cube I have one key figure "Amount" and a characteristic "Currency Type" that has the values "Local Currency" and "Document Currency". The key figure is associated with the characteristic "Currency"(0CURRENCY).
    I have a report demand that requires me to collect values (Document Currency) from both reports and the report should also be drilled down on the characteristic "Currency". Now the demand is for one characteristic for Currencies and I would like to know what my options are.
    The only two ideas that I have is
    1. Add a new custom characteristic "Document Currency" in both cubes and populate it with the Document Currency.
    2. Create a virtual characteristic that combines both characteristics into one.
    None of these options are very appealing to me and I was wondering if there is a third option which I have missed?
    I could also mention that I am doing this query in Bex Analyzer.
    Thank you in advance for your help!
    /Marcus

    The main frame should be a JFrame, the small frame should be a JDialog.

  • How to display 3 lines in an AnyChart candlestick flash chart ?

    Hi,
    I have a nice Candlestick flash chart and I am using Anychart 5.1.2. i would like to display 3 horizontal bar lines on this chart.
    The values on the y axis on these 3 bar lines are contained into 3 items. Do you have an idea on how to display these lines with the XML ? Here is the XML existing.
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <root>
      <type>
        <chart type="Candlestick">
          <animation enabled="no"/>
          <hints auto_size="yes">
            <text><![CDATA[{NAME}
    Niveau maxi: {HIGH}
    Niveau moyen: {OPEN}
    Niveau mini: {LOW}]]>
    </text>
            <font type="Verdana" size="10" color="0x000000" />
          </hints>
          <names show="yes" width="150" placement="chart" position="bottom" >
            <font type="Verdana" size="10" color="0x000000" />
          </names>
          <values show="no" prefix="" postfix=" m ngf" decimal_separator="." decimal_places="0" />
          <arguments show="no" />
          <candlestick_chart>
            <bulls>
              <background enabled="yes" color="White" />
            </bulls>
            <bears>
              <background enabled="yes" color="Black" />
            </bears>
          </candlestick_chart>
        </chart>
        <workspace>
          <background enabled="yes" type="solid" color="0xffffff" alpha="0" />
          <base_area enabled="no" />
          <chart_area enabled="yes" x="80" y="50" width="670" height="280" deep="0">
            <background enabled="no"/>
            <border enabled="yes" size="1"/>
          </chart_area>
          <name text="&P8_SITE_AFF. - Niveau du &P8_DATE_DEBUT. au &P8_DATE_FIN. - Pas de temps : &P8_TRUNC. (DD : Jour, HH24 : Heure, MI : Minute)" >
          <font type="Verdana" size="14" color="0x000000" align="center" />
          </name>
    <x_axis name="Niveau min : &P8_NIVEAU_MIN. m ngf - Niveau max : &P8_NIVEAU_MAX. m ngf - Niveau moyen : &P8_NIVEAU_MOYEN. m ngf" smart="yes" position="center_bottom" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </x_axis>
          <y_axis name="Niveau" smart="yes" position="left_center" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </y_axis>
          <grid>
            <values />
          </grid>
        </workspace>
        <legend enabled="no"/>
      </type>
      #DATA#
    </root>Thank you for your kind help.
    Christian

    Hi,
    I have a nice Candlestick flash chart and I am using Anychart 5.1.2. i would like to display 3 horizontal bar lines on this chart.
    The values on the y axis on these 3 bar lines are contained into 3 items. Do you have an idea on how to display these lines with the XML ? Here is the XML existing.
    <?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
    <root>
      <type>
        <chart type="Candlestick">
          <animation enabled="no"/>
          <hints auto_size="yes">
            <text><![CDATA[{NAME}
    Niveau maxi: {HIGH}
    Niveau moyen: {OPEN}
    Niveau mini: {LOW}]]>
    </text>
            <font type="Verdana" size="10" color="0x000000" />
          </hints>
          <names show="yes" width="150" placement="chart" position="bottom" >
            <font type="Verdana" size="10" color="0x000000" />
          </names>
          <values show="no" prefix="" postfix=" m ngf" decimal_separator="." decimal_places="0" />
          <arguments show="no" />
          <candlestick_chart>
            <bulls>
              <background enabled="yes" color="White" />
            </bulls>
            <bears>
              <background enabled="yes" color="Black" />
            </bears>
          </candlestick_chart>
        </chart>
        <workspace>
          <background enabled="yes" type="solid" color="0xffffff" alpha="0" />
          <base_area enabled="no" />
          <chart_area enabled="yes" x="80" y="50" width="670" height="280" deep="0">
            <background enabled="no"/>
            <border enabled="yes" size="1"/>
          </chart_area>
          <name text="&P8_SITE_AFF. - Niveau du &P8_DATE_DEBUT. au &P8_DATE_FIN. - Pas de temps : &P8_TRUNC. (DD : Jour, HH24 : Heure, MI : Minute)" >
          <font type="Verdana" size="14" color="0x000000" align="center" />
          </name>
    <x_axis name="Niveau min : &P8_NIVEAU_MIN. m ngf - Niveau max : &P8_NIVEAU_MAX. m ngf - Niveau moyen : &P8_NIVEAU_MOYEN. m ngf" smart="yes" position="center_bottom" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </x_axis>
          <y_axis name="Niveau" smart="yes" position="left_center" >
            <font type="Verdana" size="14" color="0x000000" bold="no" align="center" />
          </y_axis>
          <grid>
            <values />
          </grid>
        </workspace>
        <legend enabled="no"/>
      </type>
      #DATA#
    </root>Thank you for your kind help.
    Christian

  • How to integrate bing map for including or displaying multiple locations at the same time

    how to integrate bing map for including or displaying multiple locations at the same time

    Have you aware of the geolocation field that's been introduced with SharePoint 2013?  You can store location data within a list and then integrate this within Bing.  The second tutorial on this Bing team blog will show it well.
    https://www.bing.com/blogs/site_blogs/b/maps/archive/2013/03/26/connecting-a-sharepoint-list-to-bing-maps.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • How can i check if the lines are the same ?

    private bool displayed;
    private void PostMessage()
    for (int i = 0; i < ScrollLabel._lines.Length; i++)
    for (int x = 0; x < WordsList.words.Length; x++)
    if (ScrollLabel._lines[i].Contains(WordsList.words[x]) && !displayed)
    displayed = true;
    lineToPost = ScrollLabel._lines[i];
    PostFacebookWall(LongaccessToken, lineToPost + Environment.NewLine + Environment.NewLine + "נשלח באופן אוטומטי כניסיון דרך תוכנה");
    I call this method in a timer tick event every second.
    But if the variable string lineToPost is
    identical it will not send it again. But it might be a situation that the lineToPost may
    contain the exact same word inside but the whole line is not the same so i want to send it.
    Only if the whole line is the same, then don't make the postFacebookWall
    If the whole line is not the same but the same word is the line as in other line(s), then use thePostFacebookWall method.
    I'm using a bool variable
    so it will not send the same line over and over again.
    I would like it to send the line(s) once, regardless if there is only one line or if there are more than one line.
    The problem is the way I'm using the bool now,
    it will send a line and then will never send any other line at all.
    I tried to change the method to this:
    // key: line index, value: sent line
    private Dictionary<int, string> sent = new Dictionary<int, string>();
    private void PostMessage()
    for (int i = 0; i < ScrollLabel._lines.Length; i++)
    var line = ScrollLabel._lines[i];
    if (sent.ContainsKey(i) && sent[i] == line) continue;
    sent[i] = line;
    if (WordsList.words.Any(line.Contains))
    PostFacebookWall(LongaccessToken, line + Environment.NewLine + Environment.NewLine
    + "נשלח באופן אוטומטי כניסיון דרך תוכנה");
    numberofposts += 1;
    label7.Text = numberofposts.ToString();
    But its not good it keep sending many times the same lines.
    This is the timer tick event code:
    private void timer1_Tick(object sender, EventArgs e)
    counter += 1;
    if (counter == 10)
    scrollLabel1.Reset();
    scrollLabel1.Text = " ";
    scrollLabel1.Invalidate();
    readableRss = RssReader.covertRss("http://rotter.net/rss/rotternews.xml");
    this.scrollLabel1.Text = readableRss;
    scrollLabel1.Invalidate();
    counter = 0;
    PostMessage();
    Im updating the text/lines every 10 seconds .
    And calling the PostMessage method every second.
    And when im calling the PostMessage it should it should call inside the method PostFacebookWall only when the whole line is not identical to other lines and if a word in words is exist in any line.
    The variable WorldList.words is string[] contain some words(string).
    For example if i have this line:
    "hello this is a test"
    So the word test exist in words so post this line.
    Then if i have another line :
    "hello this is a test" so in dont post this line since its the same.
    But if i have a line: "hi this is a test" the word test exist but the whole line is not the same as above so post this line.
    And of course if there is a different line with a word that exist like: "my name"
    Then post this line too.

    Hi Chocolade1972,
    C# forum:
    Discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.
    I’m afraid that it is not the correct forum about this issue, I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get two parameters in the same line of selection screen?

    hello
    i need to get my selection csreen like bellow.
    r1 radiobuttion  -some space --p1 parameter
    i should not get the parameter in the next line of  radiobuttion.
    how to get two parameters in the same line of selection screen?

    hi....
    modify the following code
    it will work
    SELECTION-SCREEN BEGIN OF BLOCK SL1 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(15) TEXT-001
                     FOR FIELD P1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS : P1 TYPE   C USER-COMMAND R2 RADIOBUTTON GROUP R2 DEFAULT 'X',
      P2 TYPE SCARR-CARRNAME,
      P3 TYPE CHAR1 RADIOBUTTON GROUP R2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK SL1.

  • How to write two item in the same line?

    In the smartforms,how to write two item in the same line?
    eg
    1   *************                                    2  *****************
    3  **************                                   4  ******************
    5  ***************
    Anyone got any idea to do this.
    Thanks in advance

    Hi,
    In the smartform the main windows is 20cm.I use the table output my data.Because the output is two item in same line,I define two rows in the table line type.
    Question:
    Should I define the table width 20cm?
    In the main area of table , should I define two folders and each of folder include a line? The second item I had already defined as Append Directly,but the item 1 and item 2 don't in the same line.
    Regards

  • How to display link content on the the same sharepoint page on click event

    "How to display link content on the the same sharepoint page on click event"
    Detail:
    we are using a document library where all html files are stored/uploaded.  we would like to display/open the html file on the same sharepoint page where all the files are listed.
    Thanks.

    Use jQuery and set the target to self to the anchor tag
    Regards,
    Sairam Avacorp Technologies

Maybe you are looking for

  • Error when refreshing a report off of SFDC

    Post Author: jpettitt CA Forum: crystalreports.com When trying to refresh reports in CRDC embedded into SFDC the following error is shown. Error in File Check Billing: Database Connector Error.The report has been working for some time now and all of

  • Dynamic String in URL of Plain HTTP adatper

    Hi, buddies.       Recently we are trying to interact with a system by using the GET method of HTTP. Thus the string of URL maybe vary. Can I acheive that in plain http adapter? Thanks in advance.

  • Help in User Exit MV45AFZB

    Hi, We have a User Exit for SO, MV45AFZB. We want to insert a condition in it that when we change the plant, new pricing should be carried out.. Please let me know where i should check the condition, in Form  USEREXIT_CHECK_VBAP or Form  USEREXIT_NEW

  • Bug Generated in NT 4.0 sp 5

    I recently installed Oracle Forms 6i and Reports 6i. Now though not all the time when I am logging off my workstation (standalone not on a network)the system crashes to the dreaded blue screen to preform a physical dump and the sys locks up causing m

  • E2E_HK_CONTROLLER

    Hi, In SM37 i have a failed batchjob: E2E_HK_CONTROLLE. What kind of job is this?