How to set color of our specified JTable's row

i need to set color of our specified JTable's row.so send the coddings of that part.

i need to set color of our specified JTable's row.so
send the coddings of that part.I think you misunderstand how this forum works...
If you have a problem, you post your problem here with example code which demonstrates said problem...
The people here then attempt to help you if they want to.
You do not post demands for code examples

Similar Messages

  • How to set color for a tabstrip in BSP

    Hello all,
    Can anyone please let me know how to set color for a tabstripn in BSP?
    I am using the below syntax but it still gives me the default color.
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
    <htmlb:tabStrip id         = "TabStrip"
                          bodyHeight = "200"
                          bodyColor  = "red"
                          width      = "700" >
    </htmlb:tabStrip>
    </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks,
    Sandeep

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • How to set colors in cells depending the conditions  in alvtree

    Hi All,
    Could you please provide me idea or sample program how to set colors in cells depending the conditions  in alvtree.
    Thanks,
    Suresh

    When running vim in a terminal, it will use whatever colour scheme is defined by the terminal.  You should have a look at this thread:
    http://bbs.archlinux.org/viewtopic.php?id=51818
    Also, check the wiki article on Xdefaults.

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • How to set color to a column in ALV?

    Based on standard example BCALV_GRID_01 to modify,
    how to set color to a column???
    Moderator message: please search for available information/documentation before asking.
    Edited by: Thomas Zloch on Nov 6, 2010 9:43 AM

    Hi Sai ,
    you are posting the querry in the wrong forum ..
    but still I will answer ur querry...
    Incase you are not using the standard class to make your ALV then u can set the color of each column in the propertiesof column in the design time .
    Incase u see the colors in the design time but is not able to see the colors at the run time then you check the settings of the table I dont have system right now else I could have told you exact property...
    else if u r amking alv from the standard class then u will have to search the net for the method to color the same ..
    Thanks
    Sahil.

  • How to set color profile when exporting a RAW file version as a JPEG?

    I import my raw files to Aperture and when exporting as a JPEG I want to specify a color profile of sRBG. I cannot see how to set the color profile for the export. Does anyone know how to do this?

    When you go to export versions, edit the presets, and there is a drop down box that lets you select the profile.
    I'd suggest picking up the Aperture book by Luna, Long, and Harrington. Lots of great info there.

  • How to change color of a multiRowed JTable

    I have a MultiLineCellRenderer set to my Jtable, so i can put multiple lines in one row. Now i need the ability to change the color of the text within one row... (first row is a different color than the second row within a single jtable row). hopefully im not talking in circles :-). anyone know how this can be done?.... thanks

    thanks, yea i got it working. In the code above, i extended jtextarea, but really there is no easy way (that i can find) to change its contents to more than one color (if there is, i'd like to see it). So to accomplish this, instead extend jEditorPane and use its html capabilities. here is the code...
    public class MultiLineCellRenderer extends JEditorPane  implements TableCellRenderer {
      public MultiLineCellRenderer() {
        //setLineWrap(true);
        //setWrapStyleWord(true);
        setOpaque(true);
        setContentType("text/html");
      public Component getTableCellRendererComponent(JTable table, Object value,
                   boolean isSelected, boolean hasFocus, int row, int column) {
        if (isSelected) {
          setForeground(table.getSelectionForeground());
          setBackground(table.getSelectionBackground());
        } else {
          setForeground(table.getForeground());
          setBackground(table.getBackground());
        setFont(table.getFont());
        if (hasFocus) {
          //setBorder( UIManager.getBorder("Table.focusCellHighlightBorder") );
          if (table.isCellEditable(row, column)) {
            //setForeground( UIManager.getColor("Table.focusCellForeground") );
            //setBackground( UIManager.getColor("Table.focusCellBackground") );
        } else {
          setBorder(new EmptyBorder(1, 2, 1, 2));
        String [] strArray = value.toString().split("\n");
        String rtStr ;
        if (strArray.length > 1)
             rtStr = "<html><head></head><body><div style=\"color:#FF0000;\">" + strArray[0] + "</div>" +
                       " <div style=\"color:#0000FF;\">" + strArray[1] + "</div></body></html>";
        else
             rtStr = "<html><head></head><body><div style=\"color:#FF0000;\"><PRE>" + strArray[0] + "</PRE></div></body></html>";
        //setText((value == null) ? "" : value.toString());
        setText(rtStr);
        return this;
    }For my application i wont ever have more than two rows within one row. As you can see using jeditorpane allows lots of flexibility... kinda cool.

  • [AS][INDCC] How to set Color Conversion field to No Color Conversion when creating PDF Export preset

    How can i set Color Conversion field in Export to PDF dialog to No Color Conversion when creating PDF Export preset? i have done a bit of searching and have found where it has been recommended to set effective pdf destination profile to use no profile but it doesn't seem to be producting the expected results.

    Yes, it seems that i had to make the change after creation, not while creating the preset. thank you.
    tell application "Adobe InDesign CC"
         set newPreset to make new PDF export preset with properties ¬
              {name:"preset name", standards compliance:none, acrobat compatibility:acrobat 7}
         tell newPreset to set PDF color space to unchanged color space
    end tell

  • How to set color of a specific pixel on an artLayer in JS

    I am brand new to PS scripting. I know I can select a 1x1 pixel rectangle and fill it with a specific color, but that seem inefficient.
    Is there a way to quickly and directly set the color of a specified pixel?
    Thanks.

    JTextArea doesn't support this, but if you read the JTextArea API you will find a link to the Swing tutorial on "Using Text Components" that will show you a text component that you can use.

  • How to set colors to table control?

    Hi all,
    can we set colors to tables columns and rows?? How can we acieve this? Any help please
    Thanks,
    Madhan.

    Hi All
    thanks for your replies..
    data tab type IF_main_view=>Elements_segment.
      data line type IF_main_view=>Element_segment.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      data wd_standard_cell type ref to cl_wd_table_standard_cell.
      data component like line of cl_abap_structdescr=>components.
      data wd_table_column type ref to cl_wd_table_column.
      node_info = lo_nd_segment->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
    if component-name = 'SEGMENT'.
      wd_standard_cell->set_cell_design( CL_WD_ABSTR_MASTER_TABLE_COL=>E_CELL_DESIGN-BADVALUE_MEDIUM ).
    endif.
    i am trying to set color for  some colomns, but i am not getting any colors??? anything wrong in this.. please help
    thanks,
    Madhan.

  • How to set  color of a  row depending on the value of column in JTable?

    Hi All,
    I have a JTable that add rows when the user clicks on the button. In this way there can be any no. of rows in my table. My table contains five columns. When a new row is added , it is added with new data each time. Also the data of the rows keep on changing time to time.
    My problem is that when the data value for the third column comes out to be -ve then color of the row should be red and if its value is +ve then the color of the row should be green.
    I have tried for this in the way but it is not working properly.
    public Component prepareRenderer(TableCellRenderer renderer,int rowIndex, int vColIndex)
         Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
    if(rowIndex<table.getRowCount() && change<0 )
              c.setForeground(Color.red);
              c.setFont(new Font("TimesRoman",Font.PLAIN,11));
    else if(rowIndex<table.getRowCount() && change>0)
    c.setForeground(new Color(20,220,20));
         c.setFont(new Font("TimesRoman",Font.PLAIN,11));
    return c;
    where change is the value of the third column.
    Any help is highly appreciated.
    Thanx in advance.
    Regards,
    Har Krishan

    Perhaps you'll find this link useful. It gives a general idea of how you can create and adjust your custom renderer:
    http://www.senun.com/Left/Programming/Java_old/Examples_swing/JTableExamples4.html
    Hope it helps.
    Eugene

  • How to set Right Alignment for a JTable column

    Hi,
    I am using a JTable for displaying database records using AbstractTableModel. It works fine. But, for the numeric fields I want to make records right aligned using setHorizontalAlignment. I tested with TableColumn.setHorizontalAlignment but it ends up with an error. Is there a solution? Please help me. Thanks in advance.
    bhuvana.

    In you table cell renderer you can specify the alignment of the text.
    public class MyTableCellRenderer extends JLabel implements TableCellRenderer
    public MyTableCellRenderer
    setOpaque(true);
    setBackground(Color.white);
    public Component getTable.....(JTable table,Object value,......) //fill all these things
    setFont(table.getFont());
    if(value instanceof Float)
    setHorizontalAlignment(SwingConstants.RIGHT);
    setText(value);
    return this;
    This would set all the Floats to RIGHT alignment.
    Thanks,
    Kalyan

  • How to set colors on some condition in barchart

    Hi,
    I want to design a crystal report with a barchart. I should specify the color of the bar based on some conditions, this colornames are maintained in the database. I tried using chart expert -> color highlights,
    is there any other way to set the color of the bar?
    Regards,
    Deepa V

    Hi Deepa,
    In charts Color Highlight is the only way to conditionally change the color of the riser bars.
    You can use multiple conditions at a time in color highlight.
    To change the color directly you can right click the bar and select the Format Series Riser and change the color (but not conditionally)
    Regards,
    Aditya Joshi

  • How to set color for a particular column in advance table?

    How can we set the color of a particular column in advance table based on some parameter feteched from vo query in process request?

    i have tried the same way as mentioned in the post but ,its giving error
    java.lang.ArrayIndexOutOfBoundsException: 0
    processRequest code
    OAAdvancedTableBean table =
    (OAAdvancedTableBean)webBean.findIndexedChildRecursive("TimEntAdvtbl");
    if (table != null)
    System.out.println("table");
    OAColumnGroupBean daily =
    (OAColumnGroupBean)table.findIndexedChildRecursive("DailyColGrp");
    if (daily != null)
    System.out.println("daily col");
    OAColumnGroupBean ColGrp6 =
    (OAColumnGroupBean)table.findIndexedChildRecursive("ColGrp6");
    if (ColGrp6 != null)
    System.out.println("ColGrp6");
    OAColumnBean SatCol =
    (OAColumnBean)webBean.findIndexedChildRecursive("SatCol");
    if (SatCol != null)
    System.out.println("col");
    OAMessageTextInputBean sat1 =
    (OAMessageTextInputBean)SatCol.findIndexedChildRecursive("sat");
    if (sat1 != null)
    System.out.println("sat1");
    OADataBoundValueViewObject csssat= new OADataBoundValueViewObject(sat1,"Color");
    sat1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, csssat);
    Error Page
    ## Detail 0 ##
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3199)
         at oracle.sql.NUMBER.toString(NUMBER.java:761)
         at oracle.sql.NUMBER.stringValue(NUMBER.java:2090)
         at oracle.jbo.domain.Number.toString(Number.java:390)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.formatObject(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.getAttributeValueImpl(Unknown Source)
         at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    Please help

  • How to set colors???

    In the code below depending on which type I call I need it to display a different color but if I specify more then one color in paint it just uses the last color specified how can I specify a color in each type outside of paint??
    Here is my code:
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class IconGen extends JComponent{
    private Color crystalblue = new Color(128,224,255);
    private Color bamboogreen = new Color(170,255,170);
    private Color salmon = new Color(255,128,128);
    private     Polygon p = new Polygon();
    private String type;          
    IconGen(String type){     //Start IconGen
              if (type.equals("Hostile")){
                   int[] x = {75,125,75,25};
                   int[] y = {25,75,125,75};
                   int pts = 4;
                   p = new Polygon(x,y,pts);
                   }     //End if Hostile
              else if (type.equals("Neutral")){
                   int[] x = {25,100,100,25,25};
                   int[] y = {25,25,100,100,25};
                   int pts = 4;
                   p = new Polygon(x,y,pts);
                   }     //End if Neutral
              else{
                   System.out.println("ERROR: " + type + " Unknown");
    }     //End IconGen
    public void paintComponent(Graphics g){
                   Graphics2D g2 = (Graphics2D)g;
                   g2.fill(p);

    Your object is considered to be null until the completion of its constructor. What would need to be done is to have a simpler constructor, and some methods outside of the constructor which are called to create your graphics. This should get around the NullPointerException. I don't do a ton of graphics programming, so I'm not sure that this is the best way, but it should work.
    m

Maybe you are looking for

  • Intermittent keyboard and trackpad freezes in 10.5.2 (not again!)

    Hi all, I'm having a major issue with my MacBook Pro built-in keyboard and trackpad. This issue is incredibly reminiscent of the previous widespread keyboard/trackpad freeze problems, documented in a number of threads, such as here: http://discussion

  • How to use different jdk on windows/unix/linux OS?

    Hi, I always use differen jdk/jre version. but always I delete first then I install jdk/jre which version I want. My question is how I change system jdk/jre setting don't uninstall jdk?

  • Hyperlinks to URL added in course in Adobe Presenter 9 does not open.

    I have a URL added in my course slide and I want student to be able to click on it and see the video on the website. But the URL does not seem to work all the time. It seems to work in Internet Explorer once in a while and does not work at all in Chr

  • Microsoft Access Reports to PDF - preserving hyperlinks

    Can someone help me figure out how to preserve hyperlinks from an Access report? I've built an application that stores project information along with embedded hyperlinks to source files on our shared server. Although I've been successful with preserv

  • Twin Monitors plugged in to an Apple Mac Laptop

    I want to buy an iBook or a PowerBook notebook / laptop but before I do I want to know if I can do the following; 1. Plug two extra flat screen monitors via a splitter into the single monitor socket in the notebook / laptop. I know it can be done on