How to Fill two color's

HAPPY NEW YEAR
Hi,
How to fill two color's in cell of jtable.
Exactly i need to fill Yellow background and on some conditions i need to put Red on Top-Right-Corner of the cell.
Thank's

Check you the reply you got in your other posting on this topic:
http://forum.java.sun.com/thread.jspa?threadID=5119850

Similar Messages

  • How to fill row colors in TableView

    Hi
    I have created a tableview and I need to fill different colors for the rows of the table.  How can I do this.  It would be helpful if some sample code is demonstrated.
    Regards,
    Vijay

    Hi Vijay,
    Use the styole attribute of the iterator class's RENDER_CELL_START method...
    eg. code in RENDER_CELL_START method...
    case p_column_key.
      when 'your_column_name'.
          p_style = 'celldesign:POSITIVE'.
    For all the possible values of p_style.....referr to <a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bsp/differencesBetweenDESIGN2002andDESIGN2003&">this Wiki Page.</a>
    For more on iterators referr to
    <a href="/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators:///people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators
    or
    <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator:///people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • How to set two colored text in one textarea

    hello friends,
    i am busy preparing chat frame which shows messages in textarea, it shows two things, one the name of chatter , the other is the message, i want the two things of different color, you can change the text color of textarea by setForeground(), but what if i want different colored text in same textarea, can anybody help me???

    I don't know if this will help u...try make sense of it :
    DefaultStyledDocument doc = new DefaultStyledDocument();
    JTextPane tp = new JTextPane(doc);
    tp.setFont (new java.awt.Font ("Arial", 1, 12));
    JScrollPane lscroller = new JScrollPane(tp);
    lscroller.setForeground (new java.awt.Color (102, 102, 153));
    lscroller.setPreferredSize (new java.awt.Dimension(496, 273));
    lscroller.setVerticalScrollBarPolicy(
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jPanel2.add ( lscroller );
    prepareAllStyles();
    void prepareAllStyles()
    aset = new SimpleAttributeSet();
    //set bold and red
    StyleConstants.setForeground(aset,Color.black);
    StyleConstants.setBold(aset,true);
    ht.put(BOLDRED,aset);
    aset = new SimpleAttributeSet();
    //set italic and green
    StyleConstants.setForeground(aset,Color.red);
    StyleConstants.setBold(aset,true);
    ht.put(ITALICGREEN,aset);
    AttributeSet current = (AttributeSet)ht.get(BOLDRED);
    doc.insertString(doc.getLength(),displaymessage + "\n",current);
    tp.setCaretPosition( doc.getLength() );

  • How to fill two variables from url parameter?

    Hello friends,
    the following case should be discussed:
    The URL restricts the values for 0CALMONTH (e.g. FILTER_IOBJNM=u20190CALMONTHu2019 FILTER_VALUE_LOW_EXT=u20191u2019 FILTER_VALUE_HIGH_EXT='2').
    Is ist possible to fill variable VAR01 with the LOW-value and VAR02 with the HIGH-value ?
    In our case we want to show in column 1 the value of the actual month, the column 2 the value of the month before. The selection must be given by URL - it is externally generated. 
    We think about customer-exit solutions (CMOD EXIT_SAPLRRS0_001 for variables), but found not yet any working solution.
    Any ideas?

    Hi Durgesh,
    we talk about a portal solution, where SAP ERP and SAP BW broadcast data. In this case the URL is generated by SAP ERP for SAP BW query.
    But the URL restricts the data for the complete SAP BW query, so we cannot restrict in the URL for the actual month only - then the month before is not in the BW-query result (the month before would be completely out of range).
    If we restrict in the URL two months, we need to "break" the URL-values into two variables.
    Regards,
    Matthias
    Edited by: Matthias Krause on Oct 25, 2011 9:30 AM
    Edited by: Matthias Krause on Oct 25, 2011 9:32 AM

  • In acrobat 9 pro how do you fill a color in a picture?

    Hello Everyone,
    Does anyone know how to fill a color in a picture using Adobe acrobat 9 Pro. Lets say you have a picture in PDF format, that has a picture of a billboard, and that billboard is not really straight, kinda different shape, how could someone leave it in as a PDF and color the bilboard?
    Any help would be great!

    Actually Graffiti it might be able to be done via 'touchup tool' without creating a new PDF. Assuming of course a photo editor like Photoshop is present.
    To the OP: Acrobat is intended as final destination format and not really suitable for editing (although minor changes can be made with the full Acrobat product). It's always best to do the changes to the original document and then make a new PDF making sure you acknowledge proper version control procedures. Changing the PDF means that you now have a PDF that doesn't match the original document.

  • How to display two calendars in a page

    Hi,
    I use Calendar wizard to display calendar in HTML DB. I am not able to display more than one calendar. Any help is highly appreciated.
    Thanks,
    Sathya.

    i) goto WIZARD tab after choosing your application.
    ii) In the WIZARD tab, click on calendar and give the inputs required. Try to create one more calendar on the same page once you have created your first one.
    iii) My HTML DB version is 1.5
    In addition, It would be great if you can tell me how to fill up colors in the cells, once you are able to create the calendar.
    Thanks.

  • How to fill a symbol with color

    How to fill a symbol with color?

    Good day!
    What do you mean by »symbol« in this case?
    Is this on a Layer of its own or is it part of a photograph?
    Could you please post a screenshot with the Layers Panel visible?
    Regards,
    Pfaffenbichler

  • How to make true two-color image from scanned rgb image...

    hello...
    I have 50 scanned images from one book, cyan + black, offset. How to easy make new two color (C+K) from this rgb images? If possible to make action.
    sample:

    How to easy make new two color (C+K) from this rgb images?
    Not at all. They need extensive adjustments long before that - they are scanned wrongly to begin with (double-sided must be scanned against a black background), have fingerprints and whatnot. Once you have them cleaned up, converting to CMYK and cleaning up the colors is anotehr matter. Could be as easy as blanking out the yellow and magenta channels, could entail additiojnal extensive work. in any case, it won#t probably be automatic.
    Mylenium

  • How to print a plot with two colors Without using two plots

    Hello everybody,
    Escuse my English (poor Frenchies....)
    I'm working with VB6 and I will need to print a plot with two colors (Some values greater than a trigger for example, ...)
    I was looking for some help to discover if that thing is possible without using another plot, this is what I'm already doing, and it do not satisfy me (and my boss....)..
    Thank for your Help.
    Julien

    Hi Julien,
    I have found on the different link to make that you want.
    This first link is on National Instrument site, the first is general, and second provided information about : How Can I Programmatically Print Out a ComponentWorks Graph Object?.
    http://digital.ni.com/public.nsf/websearch/81D87CB2A5BF6C11862569E4008240FE?OpenDocument
    http://digital.ni.com/public.nsf/websearch/dc3430165bc916c586256317006f8cc9
    Links below are on the web, and explain how do you can print a graph on Visual Basic. (the first is French link  )
    http://khany.developpez.com/tutoriel/mschart/
    http://www.programmersheaven.com/zone1/cat378/18546.htm
    Regards,
    Message Edité par Christophe S. le 12-27-2005 01:51 PM
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France

  • How to set dash line color(two colors)?

    hello all:
    Does anyone know how to set dash line color in java?
    I only know how to set line color with a single color.
    g2.setColor(Color.black);
    g2.setStroke(dashed);
    g2.draw(new Rectangle2D.Double(50, 50, 200,100));
    what I need to implement is two colors interleave on the dash line.
    so that dash line looks like this:
    ==== ====
    red white red white
    thank you for any comments.
    -Daniel.

    create 2 strokes, space them appropriately, draw the rectangle twice.

  • How do I make a two color gradient?

    I've been trying to create a two color gradient and I cannot find how to do so.

    Make sure you have two SPOT swatches available, or else your gradient will contain 4 process colors. If you only want the two colors in the file, make sure you choose those colors in the gradient panel (in pull-down menu, choose swatches). Then your gradient will use only those two spot colors. Hope this helps.
    Cheers!
    -Mikey

  • LineChart with a two color LineSeries how to?

    Hello
    Currently I am building a Flex Chart that shows the Stock Price of a Stock. Now my customer asked if it was possible to have a single LineChart with one horizontal Line that shows the closing price of the previous day and a two color Line that shows the stock price of the current day.
    He would like the Line to be green when it is above the closing price Line and red when it is below the closing price Line.
    Can someone tell me how to do this?
    All help is appreciated!

    Hello
    And how can I do this by extending the LineChart?

  • How to set fill, stroke & color to a group

    First of all, I must say I'm a complete beginner in Javascript so please have patience with me.
    What I'm trying to do is to set a lot of groups to specific fill, stroke & color using a function.
    var docRef = app.activeDocument;
    var Reg = docRef.swatches["[Registration]"].color;
    var mm = 2.834645;
    var lineWidth=0.12*mm;
    group1.stroked=true;
    group1.strokeColor = Reg;
    group1.filled = false;
    group1.strokeWidth = lineWidth;
    This works, but I have to this for every group and there are lots of them.
    So I tried to make a function:
    function setAttributes(temp)
    temp.stroked=true;
    temp.strokeColor = Reg;
    temp.filled = false;
    temp.strokeWidth = lineWidth;
    And then call that function for each group:
    setAttributes(group1);
    setAttributes(group2);
    setAttributes(group3);
    etc.
    Of course, this doesn't work since I have incredible programming skills
    Please help.
    Thanks!

    The script as it is should ONLY change the path items that are in your 'first level' of group items… If you need to change the properties of path items outside of the groups then you could add another loop… Heres one way you add the extra loop:
    var docRef = app.activeDocument;
    // Set variable to your color
    var reg = docRef.swatches.getByName("[Registration]");
    // Set a variable to the document path items collection
    var pathList = docRef.pathItems;
    // Loop through this list of objects
    for (var h = 0; h < pathList.length; h++)     {
         // Change the property values
         pathList[h].filled = false;
         pathList[h].stroked = true;
         pathList[h].strokeColor = reg.color;
         pathList[h].strokeWidth = 2;
    // Set a variable to the document groups collection
    var groupList = docRef.groupItems;
    // Loop through this list of objects
    for (var i = 0; i < groupList.length; i++)     {
         // Re-use variable for the groups path items collection
         pathList = groupList[i].pathItems;
         // Loop through this list of objects
         for (var j = 0; j < pathList.length; j++)     {
              // Change the property values
              pathList[j].filled = false;
              pathList[j].stroked = true;
              pathList[j].strokeColor = reg.color;
              pathList[j].strokeWidth = 2;
    app.redraw();

  • How to make a color wheel?

    I'm using CS4 on a Mac.
    I need to make a color wheel, like the attached, but with 24 segments.
    Could someone tell me how? Start with a circle, obviously, and then what?

    MarieMeyer wrote:
    If I wanted to try a different method - is there a way I can make a 15 degree segment with an arc at the top and bottom that I can fill with color, and then repeat it 23 times?
    The only way to do that and ensure your segments would meet in a perfect circle would be to start with the circle and divide it into a 15d segment, so you'd merely be tripling the amount of work.  Plus, it will be needlessly fussy to get that rotation correct.
    Here's what to do -- Create a circular band having the width that you want, divide it into segments, and paint the segments with the Live Paint tool:
    Draw your outer circle with the default empty fill and 1pt black stroke.
    Use Object...Path...Offset Path to offset that circle by a negative amount to get your inner circle.
    Select both circles and use Object...Compound Path...Make to get your circular band.
    Choose the Line Segment Tool, move your cursor until it's shown as being at the "center" of the circle band shape.  Hold down your Alt key to draw the line from the center of your drag and also hold down the Shift key to constrain your cursor to create a vertical line.  Draw the line until it extends past the outer edge of the circular band.
    With that line segment selected, double-click on the Rotate Tool, set a 15d rotation angle (from the center point, which is the default), choose "Preview", then click the "Copy" button to get a rotated line.
    Exit the Rotation options window, and with that last line still selected, keep hitting the Ctrl+D keys to duplicate that rotation and copy until you get your segments defined.
    Select everything and click on the selection with the Live Paint Bucket Tool to define the object as a Live Paint Group.
    Use the LPBucket to colour your circle segments as you wish:
    When you're finished, use Object...Expand to break the thing into two Groups:  the guidelines and the coloured segments.
    In the Layers Panel, select the guidelines group and hit your Delete key to get rid of the lines:
    Don't worry -- it took about 359 times longer to write all those steps than to actually do it!
    Ken

  • How to add background color in JFrame

    I have three classes, Car, CarComponent, and CarViewer. I don't know how to code background color. Do I add it to CarViewer where the JFrame is or CarComponent?
    CarViewer:
    import javax.swing.JFrame;
    public class CarViewer
       public static void main(String[] args)
          JFrame frame = new JFrame();
          frame.setSize(300, 400);
          frame.setTitle("Two cars");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          CarComponent component = new CarComponent();
          frame.add(component);
          frame.setVisible(true);
    }CarComponent
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import javax.swing.JComponent;
       This component draws two car shapes.
    public class CarComponent extends JComponent
       public void paintComponent(Graphics g)
          Graphics2D g2 = (Graphics2D) g;
          Car car1 = new Car(0, 0);
          int x = getWidth() - 60;
          int y = getHeight() - 30;
          Car car2 = new Car(x, y);
          car1.draw(g2);
          car2.draw(g2);     
    }

    What JSG said, plus I really don't think it's a good idea to instantiate new Car objects in a paintComponent override. Painting methods should be restricted to painting activities, as a matter of principle.
    One alternative is to construct your Car instances in a separate method and call repaint() when done; another is to provide a Car method say moveTo(int x, int y) OR refactor the draw(Graphics g) method of Car to draw(Graphics g, int x, int y). Both these suggest that you maintain the Car references as instance fields of CarViewer.
    In future (not this time), Swing related questions should be posted in the [Swing forum|http://forums.sun.com/forum.jspa?forumID=57]
    db

Maybe you are looking for

  • My Verizon Nightmare - Be weary of poorly trained Verizon employees in the Costco kiosks

    A few days ago my week old HTC Droid Incredible 4g LTE that I purchased at Costco developed a circular blob of yellow discoloration on the lower-left portion of the screen in the area right above the micro-USB port. It seemed to get darker while conn

  • Problem in publishing a particular  video on my Web Gallery

    hello, i have a video in quick time format which works perfectly in my imovie library. however, when i try to publish it on the Web Gallery only the audio is transferred...no video. i have tried to publish it on you tube and the same happens. any sug

  • Invoice numbers for a purchase order

    Hello Experts, For a particular purchase order, there are 2 invoice numbers in the R/3 system. But when i am running a certain BW report, which displays the invoice numbers for a PO, it is showing ony one invoice number. Please advice.

  • DB Adapter Binding Fault Not Working

    Hi, I am trying to run the application "InsertWithCatch" bpel sample in 10.1.3.1 and after testing it's always generating the same exception as below for any Database error: javax.transaction.RollbackException: Transaction has been marked for rollbac

  • Acrobat error message: The PDF document contained image masks that were not downsampled.

    I'm .pfing a document from InDesign CS2, and even after I use Acrobat 8 to try to reduce the file size, the file is still about 12 mb. I 'm getting the error listed above, and wondering if that has anything to do with it. Any suggestions? Thanks.