Line color in JTable

how can I change line color in JTable.

Then you need to do custom painting. Something like:
JTable table = new JTable(...)
     public void paintComponent(Graphics g)
          super.paintComponent(g);
          g.setColor( Color.RED );
          int y = getRowHeight(0) - 1;
          g.drawLine(0, y, getSize().width, y);
};

Similar Messages

  • How do I change the line color in a chart in Numbers on my iPad?

    How do I change the line color in a chart in Numbers on my iPad?

    Whenever I try to shift+direct select it thinks I want to move the line, so as I shift + direct select and drag my mouse across the line (to highlight it all) it moves a chunk of the line and turns it into a near perpendicular line.
    I found the appearance window, it just says "Path" (the color I want it to be that it's not)
    "Stroke" 4pt
    "Fill" (the color I want it to be that it's not)
    "Opacity": Default
    And some other buttons. I think I'll try the help line tomorrow, I know I saw a customer service number somewhere and I'm only here because the chat was unavailable. This is only one of my 3 problems with my assignment so I'll search here for answers to the other two. Learning new things is rarely fun.

  • Changing line color on XY plot

    This should be something really simple. I simple created a property node, set the active plot, and set the plot.color. What happens to some plots is the points change to my specified color and other stays as my background plot color which is white. I cant seem to get the line color to change with the point color. There are ways I can change it at run time, by right click on the plot and going into properties and setting line color in that tab.
    What am I doing that I cant get this to work at runtime?
    I attached the plot, just ignore all the missing VIs you should be able to see the problem.
    Attachments:
    SteadyStatePlot1.vi ‏350 KB

    It works just fine here using LabVIEW 7.1. Could you do us a favor and make a mini demo, just containing the xy graph, some data for it, and the related property nodes to demonstrate your problem.
    Overall comment on your VI:
    Sorry, but I am absolutely horrified by your code. I cannot believe that you need all those property nodes, especially the signaling ones, they should be used very sparingly. (For example the FOR loops on top center and in the event called "clear all points" are just pumping hot air, repeating the same action and signaling (!!) every iteration.) It also just cannot be healthy if a single event calls tons of signaling properties, such as in the above mentioned event case. Then, in the timeout event, you are rewriting the plot la
    bels and names every 10 ms. Do they really change that often???
    Please let us help you in your overall program design. It will make a big difference in your future, more complex projects if certain common desing misconceptions are not propagated. I think entire sections of your program can be deleted without loss in functionality, the code can be stripped to <20% and the CPU usage can be reduce to <2% of the current situation. Just my wild guess.
    The above is well meaning criticism, so don't take it personal. I am much harsher looking at my own early code from 8 years ago. :-) Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • Horizontal grid lines color in a spark List

    Hello,
    How to change horizontal grid lines color in a spark List using css
    Thanks

    Hello,
    How to change horizontal grid lines color in a spark List using css
    Thanks

  • How to change the particular column background  color in jTable?

    I am woking with a project, in which I am using a jTable. Then
    How to change the particular column background color in jTable?

    Use a custom Renderer. This is the JTable tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • Change line color in alv.(urgent)

    Hello , i want the line color to change when my cursor change lines in an ALV.Thx

    Hi,
           Check this website
    http://www.geocities.com/mpioud/Abap_programs.html
    reward points if useful,
    Regards,
    Niyaz

  • How can I change line colors in HTML reports?

    I have a VI that is creating an HTML report based on a table of results. I change the back ground color of the line based on failed results. However this line color change is not seen in the HTML reports. Can anyone give me a good way of basically transferring the properties of my table to the HTML report? Is it possible? Thanks in advance for any help.

    Greg - Thanks for the reply. I figured this out doing some more research. The line that I needed was "<BACKLOG="#PAYOFF">Your Cell Text</ID>. The problem I was having was that line is needed in front of the rest of the font formatting commands. For example here is my original line:
    <ID WIDTH="200"><BACKLOG="#PAYOFF"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
    The bold part in the line above is what I added. With the cell color added like this it actually created another cell and pushed existing ones one cell to the right. It then colored the second cell in the row and left the first one blank. Through looking up more examples I found that I was actually putting the cell color command in the middle of the font formatting command. So I tried putting it at the end and it then did nothing. The only way I could get the cell in the table to change and not change anything else was using the syntax below.
    <ID BACKLOG="#PAYOFF"><WIDTH="200"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
    Troy

  • Setting line color of JTree's

    Hi,
    I want to set the color of JTree's linestyle which areranch lines. what should i set to get the desired result. i set the linestyle by
    tree.putClientProperty("JTree.lineStyle", "Angled");
    How can i set the linecolor?
    Thnaks,
    Sato

    I got it to work with this:
    UIManager.put( "Tree.line", Color.black ); // for horizontal lines
    UIManager.put( "Tree.hash", Color.black ); // for vertical lines

  • I want to change guide line color each of them. very difficult work. every same color. please

    I want to change guide line color each of them. very difficult work. every same color. please

    It looks like you might be using CC, in which case CC 2014.2.2 has a very cool, New Guide layout panel
    If you are using CS6 (or CC for that matter) there is the excellent free GuideGuide extension panel.  Both would be helpful if you use a lot of guides.

  • How to change series or line color in excel 2007 using ActiveX

    I am trying to change series color using Excel 2007 with ActiveX as below. It seems the color cannot be controlled correctly. For example, if I chosse red color, my curve will be changed to blue. Any ideas?
    Also, I googled and found a guy ran into similiar problem using VBA for Excel 2007. See the link below:
    http://help.wugnet.com/office/change-series-line-color-excel-2007-vba-ftopict1062646.html
    Set ch = Worksheets("Chart").ChartObjects(1)
    Set objSeries = ch.Chart.SeriesCollection(1)
    objSeries.Format.Line.ForeColor.RGB = RGB(255, 127, 0)
    According to the post, it need to be done as follows
    objSeries.Border.Color = RGB(255, 127, 0) . But I cannot find the border property/method in ActiveX.
    The color seems to be abitrary. and I found the 

    Xubuli,
    I looked into your question and confirmed that Border.Color is not located under the Excel.Series library. Instead, you must locate it under _Worksheet.UsedRange as seen below in the figure. I am attaching the VI file where I located the the Border.Color property node, and I am also including a SubVI on the block diagram that goes into explicitly set the cell color and border. This SubVI can be found under Programming>>Report Generation>>Excel Specific>>Excel Format>>Excel Set Cell Color and Border.vi, if you have the Report Generation Toolkit installed. I hope this helps.
    Larry H
    Applications Engineer
    National Instruments
    Attachments:
    CellBorder.vi ‏8 KB

  • Change matching type line color

    Hi! How can I change the line color in a matching type quiz in Captivate 6? Those lines that connect the items from column A to B. Thank you!

    Hello and welcome to the forum,
    Have bad news, I never found a way to change the line color in mathing type questin slides.
    Lilybiri

  • 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.

  • Can Table Control alternate on line color?

    Is it possible to change line color on Table Control?  I would like the lines on the Table Control to alternate in color as to make it easier to read the data.  I tried using screen-intensifed but that changes the color on a column, I need to make every other row stand out.
    Thanks
    Edited by: Gary Morman on Mar 11, 2010 9:17 PM

    ALV Grid is editable if using the CL_GUI_ALV_GRID class.  See programs which start with BCALV_EDIT*
    Regards,
    Rich Heilman

  • Random Line Colors? noob needs helppppp :(((

    How do you make a program with random line colors heres my program:
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    import java.util.Random;
    public class Lab6 extends Applet
         public void paint(Graphics g)      
              g.drawLine(0,300,800,300);
              g.drawLine(400,0,400,600);
              Random rand = new Random(12345);
              for(int x=0;x<=100;x=x+1)
              g.drawLine(rand.nextInt(400),rand.nextInt(300),rand.nextInt(400),rand.nextInt(300));
    rand.setSeed(12345);
              for(int x=0;x<=100;x=x+1)
              g.drawLine((rand.nextInt(400) + 400),rand.nextInt(300),(rand.nextInt(400) + 400),rand.nextInt(300));
    i need to make random line colors for the second loop and i dont get how. i can only set the lines for the second loop to one color. please help! i'm a real noob. =(

    This gets the color with a hex integer. You can use
    new Color(seed.nextInt(256), ...
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    public class Lab6 extends Applet
        Random rand = new Random(12345);
        Random seed = new Random();
        public void paint(Graphics g)
            super.paint(g);
            g.drawLine(0,300,800,300);
            g.drawLine(400,0,400,600);
            for(int x=0;x<=100;x=x+1)
                g.drawLine(rand.nextInt(400),rand.nextInt(300),
                           rand.nextInt(400),rand.nextInt(300));
            rand.setSeed(12345);
            for(int x=0;x<=100;x=x+1)
                g.setColor(getColor());
                g.drawLine((rand.nextInt(400) + 400),rand.nextInt(300),
                           (rand.nextInt(400) + 400),rand.nextInt(300));
        private Color getColor()
            return new Color(seed.nextInt(0xffffff));
        static WindowListener closer = new WindowAdapter()
            public void windowClosing(WindowEvent e)
                System.exit(0);
        public static void main(String[] args)
            Applet applet = new Lab6();
            Frame f = new Frame();
            f.addWindowListener(closer);
            f.add(applet);
            f.setSize(800,600);
            f.setLocation(50,50);
            applet.init();
            f.setVisible(true);
    }

Maybe you are looking for

  • User defined F4 help on a table control field

    hi            i m calling table maintenance view on click of a button on module pool screen . i have 1 column internal table which has the contents of help to be displayed on 1 of the fields in table control . how to code and where? i m using   CALL

  • What's the best video card for both Premiere and AE on an iMac?

    I remember seeing that one card works great with Premiere but then AE doesn't like it as much for 3D. I have Premiere CC but only CS5 for AE. I might subscribe to AE CC if it's worth it.

  • Problem in Purchase info Record

    Hi All, When i try to put price in the inforecrd, it gives the Error that "Not possible to determine a condition type for the price" What does it mean... I have used P000 condition type in my Pricing for gross price... is this affecting this? And als

  • Forwarding UAR task to a new reviewer

    Wonder whether someone can clarify this. We are currently testing the UAR functionality on GRC 10 SP13. When a reviewer forward a task to another person, should the new reviwer get a notification email with the comments entered by the original review

  • Feed unique values into effect parameters of duplicated pre-comps?

    I have a pre-composition with some fairly complex particle systems that I would like to duplicate multiple times in a final comp. The trick is that I want to apply a unique "position XY" value to the various effects inside each precomp instance.  I a