How to set different font for a particular row in jtables?

How to set different font size and font type for a particular row in jtable?

More than enough sample code here:
[http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
db

Similar Messages

  • How to set different font for numbers in headings and TOCs

    Hi,
    I've noticed some people use a different font for numbers in headings and TOCs to get some extra magic. Is there any way to automate such use of fonts in the paragraph styles?
    Oh, and any suggestions on what fonts would be good for numbers?
    Thanks!

    I was merely continuing on the original theme -- any digit in any character style. It was only later revealed that (a) the OP needed old style figures, and (b) those were available in his font from the start.
    The negative lookahead is the answer to his question (copied in full now)
    Based on the above InDesignSecrets tutorial, does anyone know what to do if some of the numbers end with a dot or a comma?
    Like the Norwegian date format: 13. mai 2009
    Or the Norwegian way of pricing items: 2900,-
    and my example shows it can be done, but with an added caveat. If digits are to be set in red, using the exceptions the OP asks for, my example sentence will come out as
    "Think of a number between 1 to 10, but don't use 9."
    rather than the (here) intended
    "Think of a number between 1 to 10, but don't use 9."

  • How to set different colors for even odd rows in a data table

    hi,
    In my project i hav a data table. i am using jsf. i want the rows of the data table different colors for even, odd rows. can i do it just setting the row class property ? or there should be there some other way? please help.
    sailajoy

    Hope this helps
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title></title>
    <style type='text/css'>
    .scrollContent {
    height:100px;
    overflow-x:hidden;
    overflow-y:auto;
    .scrollContent tr {
    height: auto;
    white-space: nowrap;
    .scrollContent tr td:last-child {
    padding-right: 20px;
    .fixedHeader tr {
    position: relative;
    height: auto;
    top: expression( this.parentNode.parentNode.parentNode.scrollTop + 'px' );
    div.TableContainer {
    border: 1px solid #7DA87D;
    .headerFormat {
    background-color: white;
    color: #C8D7B5;
    margin: 3px;
    padding: 1px;
    white-space: nowrap;
    font-family: Helvetica;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    .headerFormat tr td {
    border: 1px solid #C8D7B5;
    background-color: #666633;
    .bodyFormat tr td {
         color: #000000;
         margin: 3px;
         padding: 1px;
         border: 0px none;
         font-family: Helvetica;
         font-size: 12px;
    .alternateRow {
    background-color: #C8D7B5;
    </style>
    <style type="text/css">
    div.TableContainer {
    height: 121px;
    overflow-x:hidden;
    overflow-y:auto;
    </style>
    </head>
    <body>
    <table cellpadding="0" cellspacing="0" border="0"><tr><td><div id="TableContainer" class="TableContainer" style="height:230px;">
    <table class="scrollTable">
    <thead class="fixedHeader headerFormat">
    <tr class="title">
    <td title="Sort" align="center"><b>NAME</b> </td>
    <td title="Sort" align="center"><b>Amt</b> </td>
    <td title="Sort" align="center"><b>Lvl</b> </td>
    <td title="Sort" align="center"><b>Rank</b> </td>
    <td title="Sort" align="center"><b>Position</b> </td>
    <td title="Sort" align="center"><b>Date</b></td>
    </tr>
    </thead>
    <tbody class="scrollContent bodyFormat" style="height:200px;">
    <tr class="alternateRow">
    <td>Maha</td>
    <td>
    <input type="text" name="textfield" size="7" />
    </td>
    <td align="right"><input type="text" name="textfield2" size="7" /></td>
    <td align="right"><input type="text" name="textfield3" size="7" /></td>
    <td><input type="text" name="textfield4" size="7" /></td>
    <td align="right"><input type="text" name="textfield5" size="7" /></td>
    </tr>
    <tr>
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">100%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow">
    <td>Marhanen</td>
    <td align="right">$223.04</td>
    <td align="right">83</td>
    <td align="right">99%</td>
    <td>Banker</td>
    <td align="right">06/27/2006</td>
    </tr>
    <tr>
    <td>Peter</td>
    <td align="right">$121</td>
    <td align="right">567</td>
    <td align="right">23423%</td>
    <td>FishHead</td>
    <td align="right">06/06/2006</td>
    </tr>
    <tr class="alternateRow">
    <td>Jones</td>
    <td align="right">$15</td>
    <td align="right">11</td>
    <td align="right">15%</td>
    <td>Bubba</td>
    <td align="right">10/27/2005</td>
    </tr>
    <tr>
    <td>Supa-De-Dupa</td>
    <td align="right">$145</td>
    <td align="right">91</td>
    <td align="right">32%</td>
    <td>momma</td>
    <td align="right">12/15/1996</td>
    </tr>
    <tr class="alternateRow">
    <td>ClickClock</td>
    <td align="right">$1,213</td>
    <td align="right">23</td>
    <td align="right">1%</td>
    <td>Dada</td>
    <td align="right">1/30/1998</td>
    </tr>
    <tr>
    <td>Mrs. Robinson</td>
    <td align="right">$99</td>
    <td align="right">99</td>
    <td align="right">99%</td>
    <td>Wife</td>
    <td align="right">07/04/1963</td>
    </tr>
    <tr class="alternateRow">
    <td>Maha</td>
    <td align="right">$19,923.19</td>
    <td align="right">100</td>
    <td align="right">100%</td>
    <td>Owner</td>
    <td align="right">01/02/2001</td>
    </tr>
    <tr>
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">100%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow">
    <td>Marhanen</td>
    <td align="right">$223.04</td>
    <td align="right">83</td>
    <td align="right">59%</td>
    <td>Banker</td>
    <td align="right">06/27/2006</td>
    </tr>
    <tr>
    <td>Peter</td>
    <td align="right">$121</td>
    <td align="right">567</td>
    <td align="right">534.23%</td>
    <td>FishHead</td>
    <td align="right">06/06/2006</td>
    </tr>
    <tr class="alternateRow">
    <td>Jones</td>
    <td align="right">$15</td>
    <td align="right">11</td>
    <td align="right">15%</td>
    <td>Bubba</td>
    <td align="right">10/27/2005</td>
    </tr>
    <tr>
    <td>Supa-De-Dupa</td>
    <td align="right">$145</td>
    <td align="right">91</td>
    <td align="right">42%</td>
    <td>momma</td>
    <td align="right">12/15/1996</td>
    </tr>
    <tr class="alternateRow">
    <td>ClickClock</td>
    <td align="right">$1,213</td>
    <td align="right">23</td>
    <td align="right">2%</td>
    <td>Dada</td>
    <td align="right">1/30/1998</td>
    </tr>
    <tr>
    <td>Mrs. Robinson</td>
    <td align="right">$99</td>
    <td align="right">99</td>
    <td align="right">(-10.42%)</td>
    <td>Wife</td>
    <td align="right">07/04/1963</td>
    </tr>
    <tr class="alternateRow">
    <td>Maha</td>
    <td align="right">-$19,923.19</td>
    <td align="right">100</td>
    <td align="right">(-10.01%)</td>
    <td>Owner</td>
    <td align="right">01/02/2001</td>
    </tr>
    <tr >
    <td>Thrawl</td>
    <td align="right">$9,550</td>
    <td align="right">159</td>
    <td align="right">-10.20%</td>
    <td>Co-Owner</td>
    <td align="right">11/07/2003</td>
    </tr>
    <tr class="alternateRow" >
    <td><strong>TOTAL</strong>:</td>
    <td align="right"><strong>999999</strong></td>
    <td align="right"><strong>9999999</strong></td>
    <td align="right"><strong>99</strong></td>
    <td > </td>
    <td align="right"> </td>
    </tr>
    </tbody>
    </table>
    </div></td></tr></table>
    </body>
    </html>

  • How can i set different font for different tabs/pages

    I want to set different fonts for different tabs/pages?
    is it possible to do the same? If yes how?
    I can change the fonts under tools>options>contents>advanced. but that changes global settings.
    tried some add ons too- but that too changes the global settings.
    some pages like tweetdeck do not display icons etc properly under custom fonts.
    when i check "allow pages to select their own font" tweetdeck shows up fine but a number of other pages show fonts that are too big or some non standard fonts.
    Is there a way where i can select site default fonts for some sites/tabs, and custom fonts for other sites/tabs?
    otherwise i have to open different sites in different browsers- say i use my custom fonts- which apply globally, and open tweetdeck etc in Internet Explorer or Chrome etc. if i can have all tabs in one window/browser, that would be great.

    It's not a built-in feature to override a page's styles on a tab-by-tab or site-by-site basis, but perhaps someone has created an add-on for this?
    It also is possible to create style rules for particular sites and to apply them using either a userContent.css file or the Stylish extension. The Greasemonkey extension allows you to use JavaScript on a site-by-site basis, which provides further opportunity for customization. But these would take time and lots of testing to develop and perfect (and perfection might not be possible)...
    Regarding size, does the zoom feature help solve that part? In case you aren't familiar with the keyboard and mouse shortcuts for quickly changing the zoom level on a page, this article might be useful: [[Font size and zoom - increase the size of web pages]].

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • How to set different Icons for Jtreenode

    How to set different Icons for Jtreenode,i want to set icons for jtreenode,not only for leaf,open,closeicon,i hope that each node has a different icon.Thanks!

    you need to check for the node value within a renderer, then assign an icon based on what you expect to get back.
    check out this page. http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

  • How to set different icons for different windows which is seen in the top left corner?

    Hi
    How to set different icons for different windows which is seen in the top left corner? I know when building exe there is a option to edit icons or add icons and that icon is default for all the windows in the project. But i want different icons for different windows which is possible in VB.
    Is there any way to set icon by calling any dlls.
    Thanks & Regards
    Samuel J
    [email protected]

    Hi Sam,
    no problem. See the attachment.
    Mike
    Attachments:
    TestIcon_LV85.zip ‏44 KB

  • How to set the color to the particular row in a report

    Hi
    I have a report in which I have an edit link(I changed the id as edit link)..When I click that link, all the details(the whole row details) will be appearing on the items nearer to the report to save the changes....
    I want to set the color for the particular row when a link is clicked and the color should not be changed until I save the changes in items...After saving the changes, the report should come in the normal color...this is my requirement..i refered many forums regarding this...But could not find solution....If anyone knows,please help me...
    Fazila

    Here is how I would implement
    Create renderer
    Add SkinnableContainer element and create a skin for this container namely SkinnableContainerSkin
    find the fill section in the skin
    add bitmap fill to the fill section and give the source of the image which you are planning to use(Hopefully this is a direct way of doing, may be you need to hack this a little to get it to work)
    I've never tried this, but should help you give some idea.

  • How to set different sounds for different events?

    Hello I had Xiaomi Mi2s before and I could set different sound for every email account I had, for sms, for facebook and so on. How do I do it on my Xperia? Of course that for example SMS is more important then some facebook comment, so I would like to hear what happened because not every time I want to reach my phone.

    Open each app > menu > settings > notification sound > change the sound > done > repeat as needed 
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • How to set different ringtones for contacts ?

    hi!, i got my iphone friday night and ive tried setting different ringtones for different people..but it doesnt work...my normal ringtone is disturbed..when my friends call..i want it to be different for each one of them..i changed it in the contacts...everytime they used to call it would say there name..ever since i put the ringtone in..the phone doesnt recognize the contact?

    Try a reset and/or restore.
    It should work, mine work properly.

  • How to set the iterator on a particular row by a value?

    Hi all,
    What I'm trying to do is:
    Duplicate a row by a database function and setting the iterator on the duplicated row.
    The first part works fine, but I've got no idea on how to set the iterator on the new row.
    The function returns the primary key for the new row.
    Has anybody got an idea how to find out where the new row is inserted into the iterator?
    Thanks alot in advance
    Sebastian Lorenz

    Take a look at the documentation. You should be able to build a complex key as an array of the key values.
    Key public Key(java.lang.Object[] keyValues)Constructs a Key from a set of key values.
    A key may be constructed to identify a row or a set of rows. If it is to identify a unique row, the key values must match the row's key attributes exactly.
    A partial key (where some key values are null) may be used to locate a set of partially matching rows. This is applicable only for oracle.jbo.RowIterator's findByKey(Key) method. See oracle.jbo.RowIterator.findByKey(Key) for details.
    The key values should be ordered as in the defintion for the given row (that of the Entity or the View Object).
    Parameters:keyValues - an array of key values.
    Hope this helps

  • [CS2/CS3 JS] How to set Default Font for multiple documents

    Hello,
    How do I set the default font for any new text frames I create.
    I have several thousand InDesign templates in which the default font is set to a font that is no longer licenced and therefore requires changing.
    I already have a script which will open each template and change the first insertion point of any (empty) text frame to a new font but any new text frames created in these templates still want to use the unlicensed font.
    Thanks for any assistance.
    Simon Kemp

    for existing documents:
    app.activeDocument.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
    for newly created ones:
    app.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');

  • How to set custom widths for a particular report column?

    how could I set a custom width for a particular report column? Is there a way to do it using css?
    Thank you.

    Hi Leland,
    I have tested this here: [http://apex.oracle.com/pls/otn/f?p=267:18]
    All I have done is add the following into the report's Region Header:
    &lt;style type="text/css"&gt;
    #apexir_EMPNO {width:200px}
    #apexir_ENAME {width:200px}
    #apexir_DEPTNO {width:200px}
    .apexir_WORKSHEET_DATA TR TD {height:100px;}
    &lt;/style&gt;The headers have all be set to be left-aligned. Each column should be 200px wide (even though I'm setting the width on the headers, it will be applied to the entire column unless a cell's contents is wider, in which case the column is made wider). The final entry above adjusts the height of all TDs within the IR table.
    Andy

  • How to disable a Column for a particular row in Advanced Tables

    Hi All,
    We are using an Advanced Table for search criteria. Our requirement demands to disable a column (we are using messagechoice item in that column) for only first row. We use standard Add Another Row functionality to add the rows.For the remaining rows it (message choice) should be enabled. Can anyone help me to solve.
    Regards,
    Sundeep

    You can either use a Switcher or OADataBoundVariables for this.
    Please see the section OADataBoundVariable in the dev guide. Based on certain View Attribute value, you can set the specific column in the table as Read Only.
    Switcher can be very similar too. Decide an Attribute for the Switcher and make sure the first row (which you want to disable) has some specific value. All other rows should have some other value. Decode can help you here. Then you would need to create two cases. Under the specific to first row, have a read only item. For the other case, have an enterable item. A little read through of the Switcher chapter in the Dev guide would clarify the doubts if any.
    Regards
    Sumit

Maybe you are looking for

  • How can I know the delta field for CO-PA datasource?

    Hi,folks:     How can I know which is the field assigned as the delta field for CO-PA datasource,as is noticed in the note that after PI2004 the logic has been turned to general datasource,but I can't find the datasource through RSO2.     Full points

  • Oracle VM Template Error - Power on VM:  failed

    Hi This is driving me crazy. I'm trying to do proof on concept so I can check we can use this in our enterprise. I have set up 64bit Oracle VM and Oracle VM Manager with a working 2003 server no problems its running fine. I have downloaded the Oracle

  • Drawing Perpendicular Lines...

    All, I have a program that draws simple lines using the Line2D class. As I draw the line, I bisect it to get a point in the middle of the line. Now I have 3 points on my line. From here I am trying to draw a short perpendicular line originating from

  • Badi BBP_CATALOG_TRANSFER in EBP portal

    we have implemented  badi BBP_CATALOG_TRANSFER I have kept the debugger in the code written under this implementation . 1. when I try to execute it giving CATALOG ID as input I am not getting any data in parameter u201CCATALOG_CONTENTu201D 2. when i

  • Validating but not rendering

    All my styling after body is not showing up. My css and html validate, any feedback would rock extra hard. Here is my code CSS body { color:#333; font-family: helvetica; font-size: small; background-color: #fff; border: 1px dotted #abffbe; header { b